home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / A / Arrange Developer Kit 1.0.sit / Examples / Meeting Maker / MeetingMaker.cp < prev    next >
MacBinary  |  1994-07-15  |  34.5 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: MeetingMaker.cp

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert MS-DOS Code Page Info (other/dosCodePage) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Jul 15 15:43:50 1994, modified Fri Jul 15 15:43:50 1994, creator 'MPS ', type ASCII, 33982 bytes "MeetingMaker.cp" , at 0x853e 1106 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 4d 65 65 74 69 6e | 67 4d 61 6b 65 72 2e 63 |..Meetin|gMaker.c|
|00000010| 70 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |p.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 84 be 00 | 00 04 52 aa 4c 97 76 aa |........|..R.L.v.|
|00000060| 4c 97 76 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |L.v.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 59 bb 00 00 |........|....Y...|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 22 41 72 72 61 6e 67 |#include| "Arrang|
|00000090| 65 43 61 6c 6c 62 61 63 | 6b 73 2e 68 22 0d 23 69 |eCallbac|ks.h".#i|
|000000a0| 6e 63 6c 75 64 65 20 22 | 50 6c 75 67 69 6e 4c 69 |nclude "|PluginLi|
|000000b0| 62 72 61 72 79 2e 68 22 | 0d 0d 23 69 6e 63 6c 75 |brary.h"|..#inclu|
|000000c0| 64 65 20 3c 44 69 61 6c | 6f 67 73 2e 68 3e 0d 23 |de <Dial|ogs.h>.#|
|000000d0| 69 6e 63 6c 75 64 65 20 | 3c 46 69 6c 65 73 2e 68 |include |<Files.h|
|000000e0| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 4d 65 6d 6f |>.#inclu|de <Memo|
|000000f0| 72 79 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ry.h>.#i|nclude <|
|00000100| 53 74 72 69 6e 67 2e 68 | 3e 0d 23 69 6e 63 6c 75 |String.h|>.#inclu|
|00000110| 64 65 20 3c 54 65 78 74 | 55 74 69 6c 73 2e 68 3e |de <Text|Utils.h>|
|00000120| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 4f 53 55 74 69 |.#includ|e <OSUti|
|00000130| 6c 73 2e 68 3e 0d 0d 0d | 2f 2a 20 54 68 69 73 20 |ls.h>...|/* This |
|00000140| 66 69 6c 65 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |file con|tains th|
|00000150| 65 20 63 6f 64 65 20 66 | 6f 72 20 61 6e 20 49 6d |e code f|or an Im|
|00000160| 70 6f 72 74 2f 45 78 70 | 6f 72 74 20 66 69 6c 74 |port/Exp|ort filt|
|00000170| 65 72 20 70 6c 75 67 69 | 6e 20 74 68 61 74 20 69 |er plugi|n that i|
|00000180| 73 20 0d 20 2a 20 73 70 | 65 63 69 66 69 63 20 74 |s . * sp|ecific t|
|00000190| 6f 20 61 20 74 61 62 2d | 64 65 6c 69 6d 69 74 65 |o a tab-|delimite|
|000001a0| 64 20 65 78 70 6f 72 74 | 20 66 6f 72 6d 61 74 20 |d export| format |
|000001b0| 67 65 6e 65 72 61 74 65 | 64 20 62 79 20 4d 65 65 |generate|d by Mee|
|000001c0| 74 69 6e 67 4d 61 6b 65 | 72 2e 20 0d 20 2a 20 54 |tingMake|r. . * T|
|000001d0| 68 69 73 20 70 6c 75 67 | 69 6e 20 75 6e 64 65 72 |his plug|in under|
|000001e0| 73 74 61 6e 64 73 20 74 | 68 69 73 20 63 75 73 74 |stands t|his cust|
|000001f0| 6f 6d 20 66 6f 72 6d 61 | 74 2c 20 77 69 6c 6c 20 |om forma|t, will |
|00000200| 63 72 65 61 74 65 20 6e | 6f 74 65 20 61 6e 64 20 |create n|ote and |
|00000210| 66 69 65 6c 64 20 0d 20 | 2a 20 64 65 66 69 6e 69 |field . |* defini|
|00000220| 74 69 6f 6e 73 20 69 6e | 20 74 68 65 20 74 61 72 |tions in| the tar|
|00000230| 67 65 74 20 64 6f 63 75 | 6d 65 6e 74 20 74 6f 20 |get docu|ment to |
|00000240| 73 74 6f 72 65 20 74 68 | 65 20 69 6d 70 6f 72 74 |store th|e import|
|00000250| 65 64 20 69 6e 66 6f 20 | 69 6e 74 6f 2c 20 77 69 |ed info |into, wi|
|00000260| 6c 6c 20 0d 20 2a 20 70 | 65 72 66 6f 72 6d 20 73 |ll . * p|erform s|
|00000270| 69 6d 70 6c 65 20 64 61 | 74 61 20 74 72 61 6e 73 |imple da|ta trans|
|00000280| 66 6f 72 6d 61 74 69 6f | 6e 73 20 6f 6e 20 74 68 |formatio|ns on th|
|00000290| 65 20 69 6e 63 6f 6d 69 | 6e 67 20 64 61 74 61 20 |e incomi|ng data |
|000002a0| 28 61 6e 64 20 74 68 65 | 69 72 20 69 6e 76 65 72 |(and the|ir inver|
|000002b0| 73 65 73 0d 20 2a 20 6f | 6e 20 74 68 65 20 6f 75 |ses. * o|n the ou|
|000002c0| 74 67 6f 69 6e 67 20 64 | 61 74 61 29 20 74 6f 20 |tgoing d|ata) to |
|000002d0| 6d 61 6b 65 20 74 68 65 | 20 64 61 74 61 20 66 69 |make the| data fi|
|000002e0| 74 20 74 68 65 20 41 72 | 72 61 6e 67 65 20 6d 6f |t the Ar|range mo|
|000002f0| 64 65 6c 20 6d 6f 72 65 | 20 63 6c 6f 73 65 6c 79 |del more| closely|
|00000300| 2c 20 61 6e 64 20 0d 20 | 2a 20 77 69 6c 6c 20 66 |, and . |* will f|
|00000310| 69 6c 74 65 72 20 66 6f | 72 20 72 65 64 75 6e 64 |ilter fo|r redund|
|00000320| 61 6e 74 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ant info|rmation |
|00000330| 69 6e 20 74 68 65 20 74 | 61 72 67 65 74 20 64 6f |in the t|arget do|
|00000340| 63 75 6d 65 6e 74 2c 20 | 61 6e 64 20 73 75 70 70 |cument, |and supp|
|00000350| 72 65 73 73 0d 20 2a 20 | 64 75 70 6c 69 63 61 74 |ress. * |duplicat|
|00000360| 65 64 20 6e 6f 74 65 73 | 2e 20 54 68 69 73 20 69 |ed notes|. This i|
|00000370| 73 20 64 6f 63 75 6d 65 | 6e 74 65 64 20 69 6e 20 |s docume|nted in |
|00000380| 6d 6f 72 65 20 64 65 74 | 61 69 6c 20 62 65 6c 6f |more det|ail belo|
|00000390| 77 2e 0d 20 2a 20 0d 20 | 2a 20 54 68 69 73 20 66 |w.. * . |* This f|
|000003a0| 69 6c 65 20 61 6c 73 6f | 20 63 6f 6e 74 61 69 6e |ile also| contain|
|000003b0| 73 20 61 20 76 65 72 79 | 20 73 69 6d 70 6c 65 20 |s a very| simple |
|000003c0| 72 65 61 64 20 73 74 72 | 65 61 6d 20 63 6c 61 73 |read str|eam clas|
|000003d0| 73 20 74 68 61 74 20 77 | 69 6c 6c 20 63 61 63 68 |s that w|ill cach|
|000003e0| 65 20 64 69 73 6b 0d 20 | 2a 20 61 63 63 65 73 73 |e disk. |* access|
|000003f0| 20 69 6e 20 34 4b 20 63 | 68 75 6e 6b 73 2e 0d 20 | in 4K c|hunks.. |
|00000400| 2a 20 0d 20 2a 20 42 61 | 73 65 64 20 6f 6e 20 47 |* . * Ba|sed on G|
|00000410| 65 6e 65 72 69 63 50 6c | 75 67 69 6e 2e 63 70 20 |enericPl|ugin.cp |
|00000420| 61 73 20 6f 66 20 37 2f | 31 35 2f 39 34 2e 0d 20 |as of 7/|15/94.. |
|00000430| 2a 2f 0d 0d 23 64 65 66 | 69 6e 65 20 4d 6f 64 75 |*/..#def|ine Modu|
|00000440| 6c 65 52 73 72 63 49 44 | 20 30 78 46 46 46 46 38 |leRsrcID| 0xFFFF8|
|00000450| 34 30 30 0d 0d 23 64 65 | 66 69 6e 65 20 62 61 73 |400..#de|fine bas|
|00000460| 65 43 6d 64 43 6f 64 65 | 20 30 78 31 32 30 30 30 |eCmdCode| 0x12000|
|00000470| 32 30 30 20 2f 2f 20 72 | 65 70 6c 61 63 65 20 74 |200 // r|eplace t|
|00000480| 68 69 73 20 77 69 74 68 | 20 61 20 76 61 6c 75 65 |his with| a value|
|00000490| 20 6f 62 74 61 69 6e 65 | 64 20 66 72 6f 6d 0d 09 | obtaine|d from..|
|000004a0| 09 09 09 09 09 09 09 09 | 09 20 2f 2f 20 43 6f 6d |........|. // Com|
|000004b0| 6d 6f 6e 20 4b 6e 6f 77 | 6c 65 64 67 65 2e 0d 0d |mon Know|ledge...|
|000004c0| 23 64 65 66 69 6e 65 20 | 61 62 6f 75 74 43 6d 64 |#define |aboutCmd|
|000004d0| 43 6f 64 65 20 20 20 20 | 28 62 61 73 65 43 6d 64 |Code |(baseCmd|
|000004e0| 43 6f 64 65 20 2b 20 30 | 29 0d 0d 0d 2f 2f 20 53 |Code + 0|)...// S|
|000004f0| 54 52 23 20 72 65 73 6f | 75 72 63 65 20 49 44 73 |TR# reso|urce IDs|
|00000500| 20 61 6e 64 20 69 6e 64 | 69 63 69 65 73 0d 23 64 | and ind|icies.#d|
|00000510| 65 66 69 6e 65 20 72 46 | 69 65 6c 64 4e 61 6d 65 |efine rF|ieldName|
|00000520| 53 74 72 69 6e 67 73 20 | 4d 6f 64 75 6c 65 52 73 |Strings |ModuleRs|
|00000530| 72 63 49 44 0d 09 23 64 | 65 66 69 6e 65 20 72 4e |rcID..#d|efine rN|
|00000540| 6f 74 65 54 79 70 65 4e | 61 6d 65 20 31 30 0d 09 |oteTypeN|ame 10..|
|00000550| 0d 23 64 65 66 69 6e 65 | 20 72 4d 4d 49 6d 70 6f |.#define| rMMImpo|
|00000560| 72 74 45 78 70 6f 72 74 | 4e 61 6d 65 73 20 4d 6f |rtExport|Names Mo|
|00000570| 64 75 6c 65 52 73 72 63 | 49 44 20 2b 20 31 0d 09 |duleRsrc|ID + 1..|
|00000580| 23 64 65 66 69 6e 65 20 | 72 49 6d 70 6f 72 74 4e |#define |rImportN|
|00000590| 61 6d 65 20 31 0d 09 23 | 64 65 66 69 6e 65 20 72 |ame 1..#|define r|
|000005a0| 45 78 70 6f 72 74 4e 61 | 6d 65 20 32 0d 0d 0d 63 |ExportNa|me 2...c|
|000005b0| 6c 61 73 73 20 53 69 6d | 70 6c 65 53 74 72 65 61 |lass Sim|pleStrea|
|000005c0| 6d 3b 0d 0d 2f 2a 20 54 | 68 69 73 20 69 73 20 74 |m;../* T|his is t|
|000005d0| 68 65 20 6c 69 73 74 20 | 6f 66 20 66 69 65 6c 64 |he list |of field|
|000005e0| 73 20 69 6e 20 74 68 65 | 20 73 74 61 6e 64 61 72 |s in the| standar|
|000005f0| 64 20 66 6f 72 6d 61 74 | 20 74 68 61 74 20 77 65 |d format| that we|
|00000600| 20 61 72 65 20 69 6d 70 | 6f 72 74 69 6e 67 2e 20 | are imp|orting. |
|00000610| 0d 20 2a 20 54 68 65 20 | 76 61 6c 75 65 73 20 6f |. * The |values o|
|00000620| 66 20 74 68 65 20 65 6e | 75 6d 20 63 6f 72 72 65 |f the en|um corre|
|00000630| 73 70 6f 6e 64 20 74 6f | 20 69 6e 64 69 63 69 65 |spond to| indicie|
|00000640| 73 20 69 6e 20 61 6e 20 | 53 54 52 23 20 72 65 73 |s in an |STR# res|
|00000650| 6f 75 72 63 65 20 0d 20 | 2a 20 74 68 61 74 20 63 |ource . |* that c|
|00000660| 6f 6e 74 61 69 6e 20 74 | 68 65 20 61 63 74 75 61 |ontain t|he actua|
|00000670| 6c 20 6e 61 6d 65 73 20 | 6f 66 20 74 68 65 20 41 |l names |of the A|
|00000680| 72 72 61 6e 67 65 20 66 | 69 65 6c 64 73 20 74 68 |rrange f|ields th|
|00000690| 61 74 20 63 6f 72 72 65 | 73 70 6f 6e 64 20 0d 20 |at corre|spond . |
|000006a0| 2a 20 74 6f 20 65 61 63 | 68 20 4d 65 65 74 69 6e |* to eac|h Meetin|
|000006b0| 67 4d 61 6b 65 72 20 66 | 69 65 6c 64 2e 20 54 68 |gMaker f|ield. Th|
|000006c0| 65 20 49 44 20 6f 66 20 | 74 68 69 73 20 53 54 52 |e ID of |this STR|
|000006d0| 23 20 69 73 20 72 46 69 | 65 6c 64 4e 61 6d 65 53 |# is rFi|eldNameS|
|000006e0| 74 72 69 6e 67 73 2e 0d | 20 2a 2f 0d 65 6e 75 6d |trings..| */.enum|
|000006f0| 20 4d 65 65 74 69 6e 67 | 4d 61 6b 65 72 46 69 65 | Meeting|MakerFie|
|00000700| 6c 64 0d 09 7b 0d 09 6d | 6d 54 69 74 6c 65 20 3d |ld..{..m|mTitle =|
|00000710| 20 30 2c 0d 09 6d 6d 4c | 6f 63 61 74 69 6f 6e 2c | 0,..mmL|ocation,|
|00000720| 0d 09 6d 6d 44 61 74 65 | 2c 0d 09 6d 6d 53 74 61 |..mmDate|,..mmSta|
|00000730| 72 74 54 69 6d 65 2c 0d | 09 6d 6d 44 75 72 61 74 |rtTime,.|.mmDurat|
|00000740| 69 6f 6e 2c 0d 09 6d 6d | 50 72 69 76 61 74 65 2c |ion,..mm|Private,|
|00000750| 0d 09 6d 6d 46 6c 65 78 | 69 62 6c 65 2c 0d 09 6d |..mmFlex|ible,..m|
|00000760| 6d 4c 61 62 65 6c 2c 0d | 09 6d 6d 4e 6f 74 65 73 |mLabel,.|.mmNotes|
|00000770| 0d 09 7d 3b 0d 0d 0d 63 | 6c 61 73 73 20 50 6c 75 |..};...c|lass Plu|
|00000780| 67 69 6e 0d 09 7b 0d 70 | 75 62 6c 69 63 3a 0d 09 |gin..{.p|ublic:..|
|00000790| 50 6c 75 67 69 6e 28 63 | 6f 6e 73 74 20 41 72 72 |Plugin(c|onst Arr|
|000007a0| 61 6e 67 65 43 61 6c 6c | 62 61 63 6b 54 62 6c 2a |angeCall|backTbl*|
|000007b0| 20 74 68 65 43 61 6c 6c | 73 29 3b 0d 09 7e 50 6c | theCall|s);..~Pl|
|000007c0| 75 67 69 6e 28 29 3b 0d | 09 0d 09 61 72 48 6f 6f |ugin();.|...arHoo|
|000007d0| 6b 52 65 73 75 6c 74 20 | 43 6c 69 63 6b 4e 6f 74 |kResult |ClickNot|
|000007e0| 69 66 79 28 20 61 72 43 | 6c 69 63 6b 4c 6f 63 61 |ify( arC|lickLoca|
|000007f0| 74 69 6f 6e 20 6c 6f 63 | 2c 20 50 6f 69 6e 74 20 |tion loc|, Point |
|00000800| 77 68 65 72 65 2c 20 53 | 68 6f 72 74 20 6d 6f 64 |where, S|hort mod|
|00000810| 69 66 69 65 72 73 2c 0d | 09 09 09 09 09 09 09 09 |ifiers,.|........|
|00000820| 09 20 20 53 68 6f 72 74 | 20 63 6c 69 63 6b 43 6f |. Short| clickCo|
|00000830| 75 6e 74 2c 20 61 72 4e | 6f 74 65 49 44 20 6e 6f |unt, arN|oteID no|
|00000840| 74 65 2c 20 61 72 46 69 | 65 6c 64 49 44 20 66 69 |te, arFi|eldID fi|
|00000850| 65 6c 64 2c 0d 09 09 09 | 09 09 09 09 09 09 20 20 |eld,....|...... |
|00000860| 61 72 50 61 74 68 49 44 | 20 70 61 74 68 20 29 3b |arPathID| path );|
|00000870| 0d 09 61 72 48 6f 6f 6b | 52 65 73 75 6c 74 20 4b |..arHook|Result K|
|00000880| 65 79 4e 6f 74 69 66 79 | 20 20 28 20 53 68 6f 72 |eyNotify| ( Shor|
|00000890| 74 20 74 68 65 43 68 61 | 72 2c 20 53 68 6f 72 74 |t theCha|r, Short|
|000008a0| 20 6b 65 79 2c 20 53 68 | 6f 72 74 20 6d 6f 64 69 | key, Sh|ort modi|
|000008b0| 66 69 65 72 73 20 29 3b | 0d 09 61 72 48 6f 6f 6b |fiers );|..arHook|
|000008c0| 52 65 73 75 6c 74 20 4d | 65 6e 75 4e 6f 74 69 66 |Result M|enuNotif|
|000008d0| 79 20 28 20 49 6e 74 65 | 67 65 72 20 63 6f 6d 6d |y ( Inte|ger comm|
|000008e0| 61 6e 64 43 6f 64 65 2c | 20 49 6e 74 65 67 65 72 |andCode,| Integer|
|000008f0| 20 63 6f 6d 6d 61 6e 64 | 50 61 72 61 6d 2c 0d 09 | command|Param,..|
|00000900| 09 09 09 09 09 09 09 09 | 20 20 53 68 6f 72 74 20 |........| Short |
|00000910| 6d 6f 64 69 66 69 65 72 | 73 20 29 3b 0d 09 61 72 |modifier|s );..ar|
|00000920| 48 6f 6f 6b 52 65 73 75 | 6c 74 20 46 69 65 6c 64 |HookResu|lt Field|
|00000930| 4e 6f 74 69 66 79 28 20 | 61 72 4e 6f 74 65 49 44 |Notify( |arNoteID|
|00000940| 20 6e 6f 74 65 2c 20 61 | 72 46 69 65 6c 64 49 44 | note, a|rFieldID|
|00000950| 20 66 69 65 6c 64 2c 20 | 61 72 46 69 65 6c 64 41 | field, |arFieldA|
|00000960| 63 74 69 6f 6e 20 61 63 | 74 69 6f 6e 2c 0d 09 09 |ction ac|tion,...|
|00000970| 09 09 09 09 09 09 09 20 | 20 63 6f 6e 73 74 20 63 |....... | const c|
|00000980| 68 61 72 2a 20 63 68 6f | 69 63 65 54 65 78 74 20 |har* cho|iceText |
|00000990| 29 3b 0d 09 76 6f 69 64 | 20 20 20 20 20 20 20 20 |);..void| |
|000009a0| 20 54 6f 70 69 63 4e 6f | 74 69 66 79 28 20 61 72 | TopicNo|tify( ar|
|000009b0| 54 6f 70 69 63 49 44 20 | 6e 65 77 54 6f 70 69 63 |TopicID |newTopic|
|000009c0| 2c 20 61 72 57 69 6e 64 | 6f 77 49 44 20 6e 65 77 |, arWind|owID new|
|000009d0| 57 69 6e 64 6f 77 2c 0d | 09 09 09 09 09 09 09 09 |Window,.|........|
|000009e0| 09 20 20 61 72 54 6f 70 | 69 63 41 63 74 69 6f 6e |. arTop|icAction|
|000009f0| 20 61 63 74 69 6f 6e 20 | 29 3b 0d 09 76 6f 69 64 | action |);..void|
|00000a00| 09 09 09 20 54 69 63 6b | 4e 6f 74 69 66 79 20 28 |... Tick|Notify (|
|00000a10| 20 20 29 3b 0d 09 61 72 | 48 6f 6f 6b 52 65 73 75 | );..ar|HookResu|
|00000a20| 6c 74 20 46 69 6c 65 4e | 6f 74 69 66 79 20 28 20 |lt FileN|otify ( |
|00000a30| 61 72 46 69 6c 65 41 63 | 74 69 6f 6e 20 61 63 74 |arFileAc|tion act|
|00000a40| 69 6f 6e 20 29 3b 0d 09 | 61 72 48 6f 6f 6b 52 65 |ion );..|arHookRe|
|00000a50| 73 75 6c 74 20 51 75 69 | 74 4e 6f 74 69 66 79 20 |sult Qui|tNotify |
|00000a60| 28 20 20 29 3b 0d 09 76 | 6f 69 64 20 20 20 20 20 |( );..v|oid |
|00000a70| 20 20 20 20 41 54 4d 4e | 6f 74 69 66 79 20 20 28 | ATMN|otify (|
|00000a80| 20 20 29 3b 0d 09 0d 09 | 49 6e 74 65 67 65 72 20 | );....|Integer |
|00000a90| 49 6d 70 6f 72 74 4e 6f | 74 69 66 79 28 20 53 68 |ImportNo|tify( Sh|
|00000aa0| 6f 72 74 20 66 52 65 66 | 6e 75 6d 2c 20 49 6e 74 |ort fRef|num, Int|
|00000ab0| 65 67 65 72 20 66 6f 72 | 6d 61 74 49 44 2c 0d 09 |eger for|matID,..|
|00000ac0| 09 09 09 09 09 09 09 20 | 42 6f 6f 6c 65 61 6e 20 |....... |Boolean |
|00000ad0| 73 6e 69 66 66 2c 20 61 | 72 54 6f 70 69 63 49 44 |sniff, a|rTopicID|
|00000ae0| 20 64 65 73 74 54 6f 70 | 69 63 20 29 3b 0d 09 09 | destTop|ic );...|
|00000af0| 09 09 09 09 09 09 20 0d | 09 49 6e 74 65 67 65 72 |...... .|.Integer|
|00000b00| 20 45 78 70 6f 72 74 4e | 6f 74 69 66 79 28 20 53 | ExportN|otify( S|
|00000b10| 68 6f 72 74 20 66 52 65 | 66 6e 75 6d 2c 20 20 61 |hort fRe|fnum, a|
|00000b20| 72 54 6f 70 69 63 49 44 | 20 73 72 63 54 6f 70 69 |rTopicID| srcTopi|
|00000b30| 63 20 29 3b 0d 09 0d 70 | 72 69 76 61 74 65 3a 0d |c );...p|rivate:.|
|00000b40| 09 63 6f 6e 73 74 20 41 | 72 72 61 6e 67 65 43 61 |.const A|rrangeCa|
|00000b50| 6c 6c 62 61 63 6b 54 62 | 6c 2a 20 63 61 6c 6c 73 |llbackTb|l* calls|
|00000b60| 3b 20 2f 2f 20 63 61 6c | 6c 62 61 63 6b 20 74 61 |; // cal|lback ta|
|00000b70| 62 6c 65 0d 09 0d 09 61 | 72 4e 6f 74 65 49 44 20 |ble....a|rNoteID |
|00000b80| 47 65 6e 65 72 61 74 65 | 4d 4d 4e 6f 74 65 28 53 |Generate|MMNote(S|
|00000b90| 69 6d 70 6c 65 53 74 72 | 65 61 6d 20 2a 73 74 72 |impleStr|eam *str|
|00000ba0| 65 61 6d 2c 20 61 72 54 | 79 70 65 49 44 20 74 79 |eam, arT|ypeID ty|
|00000bb0| 70 65 2c 20 63 68 61 72 | 20 2a 72 65 61 64 42 75 |pe, char| *readBu|
|00000bc0| 66 66 65 72 29 3b 0d 09 | 61 72 54 79 70 65 49 44 |ffer);..|arTypeID|
|00000bd0| 20 41 6c 6c 6f 63 61 74 | 65 46 69 65 6c 64 73 41 | Allocat|eFieldsA|
|00000be0| 6e 64 54 79 70 65 73 28 | 29 3b 0d 09 61 72 46 69 |ndTypes(|);..arFi|
|00000bf0| 65 6c 64 49 44 20 47 65 | 74 41 72 72 61 6e 67 65 |eldID Ge|tArrange|
|00000c00| 46 69 65 6c 64 46 6f 72 | 4d 4d 46 69 65 6c 64 28 |FieldFor|MMField(|
|00000c10| 4d 65 65 74 69 6e 67 4d | 61 6b 65 72 46 69 65 6c |MeetingM|akerFiel|
|00000c20| 64 20 66 69 65 6c 64 29 | 3b 0d 09 0d 09 42 6f 6f |d field)|;....Boo|
|00000c30| 6c 65 61 6e 20 4d 4d 4e | 6f 74 65 45 78 69 73 74 |lean MMN|oteExist|
|00000c40| 73 28 61 72 4e 6f 74 65 | 49 44 20 6e 65 77 4e 6f |s(arNote|ID newNo|
|00000c50| 74 65 29 3b 0d 09 76 6f | 69 64 20 57 72 69 74 65 |te);..vo|id Write|
|00000c60| 4d 4d 4e 6f 74 65 28 61 | 72 4e 6f 74 65 49 44 20 |MMNote(a|rNoteID |
|00000c70| 6e 6f 74 65 2c 53 68 6f | 72 74 20 66 52 65 66 4e |note,Sho|rt fRefN|
|00000c80| 75 6d 29 3b 0d 09 7d 3b | 20 2f 2f 20 50 6c 75 67 |um);..};| // Plug|
|00000c90| 69 6e 0d 0d 0d 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |in.../**|********|
|00000ca0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00000ce0| 0d 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |./******|********|
|00000cf0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 20 4d |********|****** M|
|00000d00| 61 69 6e 20 65 6e 74 72 | 79 20 70 6f 69 6e 74 20 |ain entr|y point |
|00000d10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0d 2f 2a 2a |********|***/./**|
|00000d30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d70| 2a 2a 2a 2a 2a 2a 2a 2f | 0d 0d 2f 2a 20 52 6f 6f |*******/|../* Roo|
|00000d80| 74 20 65 6e 74 72 79 20 | 70 6f 69 6e 74 20 66 6f |t entry |point fo|
|00000d90| 72 20 74 68 65 20 6d 6f | 64 75 6c 65 20 2d 20 6d |r the mo|dule - m|
|00000da0| 75 73 74 20 62 65 20 74 | 68 65 20 66 69 72 73 74 |ust be t|he first|
|00000db0| 20 66 75 6e 63 74 69 6f | 6e 20 69 6e 20 74 68 65 | functio|n in the|
|00000dc0| 0d 20 2a 20 66 69 6c 65 | 2c 20 73 6f 20 74 68 61 |. * file|, so tha|
|00000dd0| 74 20 74 68 65 20 6c 69 | 6e 6b 65 72 20 77 69 6c |t the li|nker wil|
|00000de0| 6c 20 70 6c 61 63 65 20 | 69 74 20 66 69 72 73 74 |l place |it first|
|00000df0| 20 69 6e 20 74 68 65 20 | 63 6f 64 65 20 73 65 67 | in the |code seg|
|00000e00| 6d 65 6e 74 2e 0d 20 2a | 20 54 68 69 73 20 69 73 |ment.. *| This is|
|00000e10| 20 74 68 65 20 72 6f 75 | 74 69 6e 65 20 77 68 69 | the rou|tine whi|
|00000e20| 63 68 20 41 72 72 61 6e | 67 65 20 63 61 6c 6c 73 |ch Arran|ge calls|
|00000e30| 20 61 74 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | at appl|ication |
|00000e40| 73 74 61 72 74 75 70 20 | 74 69 6d 65 0d 20 2a 20 |startup |time. * |
|00000e50| 28 61 6e 64 20 61 67 61 | 69 6e 20 61 74 20 71 75 |(and aga|in at qu|
|00000e60| 69 74 20 74 69 6d 65 29 | 2e 0d 20 2a 20 0d 20 2a |it time)|.. * . *|
|00000e70| 20 4d 6f 73 74 20 70 6c | 75 67 2d 69 6e 73 20 77 | Most pl|ug-ins w|
|00000e80| 69 6c 6c 20 6e 6f 74 20 | 6e 65 65 64 20 74 6f 20 |ill not |need to |
|00000e90| 6d 6f 64 69 66 79 20 74 | 68 69 73 20 72 6f 75 74 |modify t|his rout|
|00000ea0| 69 6e 65 20 6f 72 20 74 | 68 65 20 48 6f 6f 6b 20 |ine or t|he Hook |
|00000eb0| 66 75 6e 63 74 69 6f 6e | 73 0d 20 2a 20 69 6d 6d |function|s. * imm|
|00000ec0| 65 64 69 61 74 65 6c 79 | 20 66 6f 6c 6c 6f 77 69 |ediately| followi|
|00000ed0| 6e 67 2e 20 20 41 6c 6c | 20 63 75 73 74 6f 6d 69 |ng. All| customi|
|00000ee0| 7a 61 74 69 6f 6e 20 63 | 61 6e 20 62 65 20 64 6f |zation c|an be do|
|00000ef0| 6e 65 20 69 6e 20 74 68 | 65 20 22 50 6c 75 67 69 |ne in th|e "Plugi|
|00000f00| 6e 22 0d 20 2a 20 73 65 | 63 74 69 6f 6e 20 28 62 |n". * se|ction (b|
|00000f10| 65 6c 6f 77 29 2e 0d 20 | 2a 2f 0d 65 78 74 65 72 |elow).. |*/.exter|
|00000f20| 6e 20 22 43 22 20 49 6e | 74 65 67 65 72 20 4f 75 |n "C" In|teger Ou|
|00000f30| 72 4d 6f 64 75 6c 65 52 | 6f 6f 74 28 20 4d 6f 64 |rModuleR|oot( Mod|
|00000f40| 75 6c 65 50 61 72 61 6d | 42 6c 6f 63 6b 20 2a 70 |uleParam|Block *p|
|00000f50| 62 2c 20 4d 6f 64 75 6c | 65 52 6f 6f 74 41 63 74 |b, Modul|eRootAct|
|00000f60| 69 6f 6e 20 61 63 74 69 | 6f 6e 2c 0d 09 09 09 09 |ion acti|on,.....|
|00000f70| 09 09 09 09 09 09 20 20 | 20 20 49 6e 74 65 67 65 |...... | Intege|
|00000f80| 72 20 2f 2a 70 31 2a 2f | 20 29 0d 09 7b 0d 09 2f |r /*p1*/| )..{../|
|00000f90| 2a 20 45 78 74 72 61 63 | 74 20 74 68 65 20 63 61 |* Extrac|t the ca|
|00000fa0| 6c 6c 62 61 63 6b 20 74 | 61 62 6c 65 20 66 72 6f |llback t|able fro|
|00000fb0| 6d 20 6f 75 72 20 70 61 | 72 61 6d 65 74 65 72 20 |m our pa|rameter |
|00000fc0| 62 6c 6f 63 6b 2c 20 61 | 6e 64 20 63 6f 65 72 63 |block, a|nd coerc|
|00000fd0| 65 20 69 74 0d 09 20 2a | 20 74 6f 20 74 68 65 20 |e it.. *| to the |
|00000fe0| 65 78 74 65 6e 64 65 64 | 20 41 72 72 61 6e 67 65 |extended| Arrange|
|00000ff0| 20 74 61 62 6c 65 2e 0d | 09 20 2a 2f 0d 09 41 72 | table..|. */..Ar|
|00001000| 72 61 6e 67 65 43 61 6c | 6c 62 61 63 6b 54 62 6c |rangeCal|lbackTbl|
|00001010| 2a 20 63 61 6c 6c 73 20 | 3d 20 28 41 72 72 61 6e |* calls |= (Arran|
|00001020| 67 65 43 61 6c 6c 62 61 | 63 6b 54 62 6c 2a 29 28 |geCallba|ckTbl*)(|
|00001030| 70 62 2d 3e 63 61 6c 6c | 73 29 3b 0d 09 0d 09 73 |pb->call|s);....s|
|00001040| 77 69 74 63 68 20 28 61 | 63 74 69 6f 6e 29 0d 09 |witch (a|ction)..|
|00001050| 09 7b 0d 09 09 63 61 73 | 65 20 6d 72 4c 6f 61 64 |.{...cas|e mrLoad|
|00001060| 3a 0d 09 09 09 7b 0d 09 | 09 09 2f 2f 20 41 6c 6c |:....{..|..// All|
|00001070| 6f 63 61 74 65 20 6d 65 | 6d 6f 72 79 20 61 6e 64 |ocate me|mory and|
|00001080| 20 63 72 65 61 74 65 20 | 61 20 6e 65 77 20 50 6c | create |a new Pl|
|00001090| 75 67 69 6e 20 6f 62 6a | 65 63 74 2e 0d 09 09 09 |ugin obj|ect.....|
|000010a0| 76 6f 69 64 2a 20 73 74 | 6f 72 61 67 65 20 3d 20 |void* st|orage = |
|000010b0| 63 61 6c 6c 73 2d 3e 6d | 65 6d 2d 3e 41 6c 6c 6f |calls->m|em->Allo|
|000010c0| 63 4d 65 6d 28 20 73 69 | 7a 65 6f 66 28 50 6c 75 |cMem( si|zeof(Plu|
|000010d0| 67 69 6e 29 2c 0d 09 09 | 09 09 09 09 09 09 09 09 |gin),...|........|
|000010e0| 09 09 09 09 09 20 20 61 | 6d 46 72 65 65 53 74 6f |..... a|mFreeSto|
|000010f0| 72 65 20 7c 20 61 6d 45 | 72 72 49 66 4e 6f 4d 65 |re | amE|rrIfNoMe|
|00001100| 6d 20 29 3b 0d 09 09 09 | 70 62 2d 3e 6d 6f 64 75 |m );....|pb->modu|
|00001110| 6c 65 52 65 66 63 6f 6e | 20 3d 20 75 49 6e 74 65 |leRefcon| = uInte|
|00001120| 67 65 72 28 6e 65 77 28 | 73 74 6f 72 61 67 65 29 |ger(new(|storage)|
|00001130| 20 50 6c 75 67 69 6e 28 | 63 61 6c 6c 73 29 29 3b | Plugin(|calls));|
|00001140| 0d 09 09 09 72 65 74 75 | 72 6e 20 31 3b 0d 09 09 |....retu|rn 1;...|
|00001150| 09 7d 0d 09 09 0d 09 09 | 63 61 73 65 20 6d 72 55 |.}......|case mrU|
|00001160| 6e 6c 6f 61 64 3a 0d 09 | 09 09 7b 0d 09 09 09 2f |nload:..|..{..../|
|00001170| 2a 20 44 69 73 70 6f 73 | 65 20 6f 66 20 74 68 65 |* Dispos|e of the|
|00001180| 20 50 6c 75 67 69 6e 20 | 6f 62 6a 65 63 74 20 61 | Plugin |object a|
|00001190| 6e 64 20 72 65 6c 65 61 | 73 65 20 74 68 65 20 6d |nd relea|se the m|
|000011a0| 65 6d 6f 72 79 0d 09 09 | 09 20 2a 20 69 74 20 6f |emory...|. * it o|
|000011b0| 63 63 75 70 69 65 73 2e | 0d 09 09 09 20 2a 2f 0d |ccupies.|.... */.|
|000011c0| 09 09 09 64 65 6c 65 74 | 65 20 28 50 6c 75 67 69 |...delet|e (Plugi|
|000011d0| 6e 2a 29 28 70 62 2d 3e | 6d 6f 64 75 6c 65 52 65 |n*)(pb->|moduleRe|
|000011e0| 66 63 6f 6e 29 3b 0d 09 | 09 09 63 61 6c 6c 73 2d |fcon);..|..calls-|
|000011f0| 3e 6d 65 6d 2d 3e 44 65 | 61 6c 6c 6f 63 4d 65 6d |>mem->De|allocMem|
|00001200| 28 28 76 6f 69 64 2a 29 | 28 70 62 2d 3e 6d 6f 64 |((void*)|(pb->mod|
|00001210| 75 6c 65 52 65 66 63 6f | 6e 29 2c 20 61 6d 46 72 |uleRefco|n), amFr|
|00001220| 65 65 53 74 6f 72 65 29 | 3b 0d 09 09 09 72 65 74 |eeStore)|;....ret|
|00001230| 75 72 6e 20 30 3b 0d 09 | 09 09 7d 0d 09 09 0d 09 |urn 0;..|..}.....|
|00001240| 09 63 61 73 65 20 6d 72 | 46 69 6e 64 45 6e 74 72 |.case mr|FindEntr|
|00001250| 79 3a 0d 09 09 64 65 66 | 61 75 6c 74 3a 0d 09 09 |y:...def|ault:...|
|00001260| 09 7b 0d 09 09 09 2f 2a | 20 54 68 69 73 20 6d 6f |.{..../*| This mo|
|00001270| 64 75 6c 65 20 63 6f 6e | 74 61 69 6e 73 20 6e 6f |dule con|tains no|
|00001280| 20 65 78 74 65 6e 64 65 | 64 20 65 6e 74 72 79 20 | extende|d entry |
|00001290| 70 6f 69 6e 74 73 2c 20 | 73 6f 20 77 65 20 61 6c |points, |so we al|
|000012a0| 77 61 79 73 0d 09 09 09 | 20 2a 20 72 65 74 75 72 |ways....| * retur|
|000012b0| 6e 20 30 20 66 6f 72 20 | 74 68 65 20 6d 72 46 69 |n 0 for |the mrFi|
|000012c0| 6e 64 45 6e 74 72 79 20 | 6d 65 73 73 61 67 65 2e |ndEntry |message.|
|000012d0| 20 20 4d 6f 73 74 20 70 | 6c 75 67 2d 69 6e 73 20 | Most p|lug-ins |
|000012e0| 77 69 6c 6c 20 6e 6f 74 | 0d 09 09 09 20 2a 20 75 |will not|.... * u|
|000012f0| 73 65 20 65 78 74 65 6e | 64 65 64 20 65 6e 74 72 |se exten|ded entr|
|00001300| 79 20 70 6f 69 6e 74 73 | 2e 0d 09 09 09 20 2a 2f |y points|..... */|
|00001310| 0d 09 09 09 72 65 74 75 | 72 6e 20 30 3b 0d 09 09 |....retu|rn 0;...|
|00001320| 09 7d 0d 09 09 0d 09 09 | 7d 20 2f 2f 20 73 77 69 |.}......|} // swi|
|00001330| 74 63 68 20 28 61 63 74 | 69 6f 6e 29 0d 09 0d 09 |tch (act|ion)....|
|00001340| 7d 20 2f 2f 20 4f 75 72 | 4d 6f 64 75 6c 65 52 6f |} // Our|ModuleRo|
|00001350| 6f 74 0d 0d 0d 2f 2a 20 | 54 68 65 73 65 20 68 6f |ot.../* |These ho|
|00001360| 6f 6b 20 66 75 6e 63 74 | 69 6f 6e 73 20 73 69 6d |ok funct|ions sim|
|00001370| 70 6c 79 20 70 61 73 73 | 20 63 6f 6e 74 72 6f 6c |ply pass| control|
|00001380| 20 74 6f 20 74 68 65 20 | 61 70 70 72 6f 70 72 69 | to the |appropri|
|00001390| 61 74 65 20 66 75 6e 63 | 74 69 6f 6e 0d 20 2a 20 |ate func|tion. * |
|000013a0| 69 6e 20 74 68 65 20 50 | 6c 75 67 69 6e 20 6f 62 |in the P|lugin ob|
|000013b0| 6a 65 63 74 2e 0d 20 2a | 2f 0d 73 74 61 74 69 63 |ject.. *|/.static|
|000013c0| 20 61 72 48 6f 6f 6b 52 | 65 73 75 6c 74 20 4f 75 | arHookR|esult Ou|
|000013d0| 72 43 6c 69 63 6b 48 6f | 6f 6b 28 20 4d 6f 64 75 |rClickHo|ok( Modu|
|000013e0| 6c 65 50 61 72 61 6d 42 | 6c 6f 63 6b 2a 20 70 62 |leParamB|lock* pb|
|000013f0| 2c 20 61 72 43 6c 69 63 | 6b 4c 6f 63 61 74 69 6f |, arClic|kLocatio|
|00001400| 6e 20 6c 6f 63 2c 0d 09 | 09 09 09 09 09 09 09 09 |n loc,..|........|
|00001410| 09 09 20 50 6f 69 6e 74 | 20 77 68 65 72 65 2c 20 |.. Point| where, |
|00001420| 70 53 68 6f 72 74 20 6d | 6f 64 69 66 69 65 72 73 |pShort m|odifiers|
|00001430| 2c 20 70 53 68 6f 72 74 | 20 63 6c 69 63 6b 43 6f |, pShort| clickCo|
|00001440| 75 6e 74 2c 0d 09 09 09 | 09 09 09 09 09 09 09 09 |unt,....|........|
|00001450| 20 61 72 4e 6f 74 65 49 | 44 20 6e 6f 74 65 2c 20 | arNoteI|D note, |
|00001460| 61 72 46 69 65 6c 64 49 | 44 20 66 69 65 6c 64 2c |arFieldI|D field,|
|00001470| 0d 09 09 09 09 09 09 09 | 09 09 09 09 20 61 72 50 |........|.... arP|
|00001480| 61 74 68 49 44 20 70 61 | 74 68 20 45 4e 44 50 20 |athID pa|th ENDP |
|00001490| 29 0d 09 7b 0d 09 72 65 | 74 75 72 6e 20 28 28 50 |)..{..re|turn ((P|
|000014a0| 6c 75 67 69 6e 2a 29 28 | 70 62 2d 3e 6d 6f 64 75 |lugin*)(|pb->modu|
|000014b0| 6c 65 52 65 66 63 6f 6e | 29 29 2d 3e 43 6c 69 63 |leRefcon|))->Clic|
|000014c0| 6b 4e 6f 74 69 66 79 28 | 20 6c 6f 63 2c 20 77 68 |kNotify(| loc, wh|
|000014d0| 65 72 65 2c 20 6d 6f 64 | 69 66 69 65 72 73 2c 0d |ere, mod|ifiers,.|
|000014e0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|000014f0| 09 09 63 6c 69 63 6b 43 | 6f 75 6e 74 2c 20 6e 6f |..clickC|ount, no|
|00001500| 74 65 2c 20 66 69 65 6c | 64 2c 0d 09 09 09 09 09 |te, fiel|d,......|
|00001510| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 70 61 74 |........|.....pat|
|00001520| 68 20 29 3b 0d 09 7d 0d | 0d 0d 73 74 61 74 69 63 |h );..}.|..static|
|00001530| 20 61 72 48 6f 6f 6b 52 | 65 73 75 6c 74 20 4f 75 | arHookR|esult Ou|
|00001540| 72 4b 65 79 48 6f 6f 6b | 28 20 4d 6f 64 75 6c 65 |rKeyHook|( Module|
|00001550| 50 61 72 61 6d 42 6c 6f | 63 6b 2a 20 70 62 2c 20 |ParamBlo|ck* pb, |
|00001560| 70 53 68 6f 72 74 20 74 | 68 65 43 68 61 72 2c 20 |pShort t|heChar, |
|00001570| 70 53 68 6f 72 74 20 6b | 65 79 2c 0d 09 09 09 09 |pShort k|ey,.....|
|00001580| 09 09 09 09 09 09 20 20 | 70 53 68 6f 72 74 20 6d |...... |pShort m|
|00001590| 6f 64 69 66 69 65 72 73 | 20 45 4e 44 50 20 29 0d |odifiers| ENDP ).|
|000015a0| 09 7b 0d 09 72 65 74 75 | 72 6e 20 28 28 50 6c 75 |.{..retu|rn ((Plu|
|000015b0| 67 69 6e 2a 29 28 70 62 | 2d 3e 6d 6f 64 75 6c 65 |gin*)(pb|->module|
|000015c0| 52 65 66 63 6f 6e 29 29 | 2d 3e 4b 65 79 4e 6f 74 |Refcon))|->KeyNot|
|000015d0| 69 66 79 28 74 68 65 43 | 68 61 72 2c 20 6b 65 79 |ify(theC|har, key|
|000015e0| 2c 20 6d 6f 64 69 66 69 | 65 72 73 29 3b 0d 09 7d |, modifi|ers);..}|
|000015f0| 0d 0d 0d 73 74 61 74 69 | 63 20 61 72 48 6f 6f 6b |...stati|c arHook|
|00001600| 52 65 73 75 6c 74 20 4f | 75 72 4d 65 6e 75 48 6f |Result O|urMenuHo|
|00001610| 6f 6b 28 20 4d 6f 64 75 | 6c 65 50 61 72 61 6d 42 |ok( Modu|leParamB|
|00001620| 6c 6f 63 6b 2a 20 70 62 | 2c 20 49 6e 74 65 67 65 |lock* pb|, Intege|
|00001630| 72 20 63 6f 6d 6d 61 6e | 64 43 6f 64 65 2c 0d 09 |r comman|dCode,..|
|00001640| 09 09 09 09 09 09 09 09 | 09 09 49 6e 74 65 67 65 |........|..Intege|
|00001650| 72 20 63 6f 6d 6d 61 6e | 64 50 61 72 61 6d 2c 20 |r comman|dParam, |
|00001660| 70 53 68 6f 72 74 20 6d | 6f 64 69 66 69 65 72 73 |pShort m|odifiers|
|00001670| 20 45 4e 44 50 20 29 0d | 09 7b 0d 09 72 65 74 75 | ENDP ).|.{..retu|
|00001680| 72 6e 20 28 28 50 6c 75 | 67 69 6e 2a 29 28 70 62 |rn ((Plu|gin*)(pb|
|00001690| 2d 3e 6d 6f 64 75 6c 65 | 52 65 66 63 6f 6e 29 29 |->module|Refcon))|
|000016a0| 2d 3e 4d 65 6e 75 4e 6f | 74 69 66 79 28 20 63 6f |->MenuNo|tify( co|
|000016b0| 6d 6d 61 6e 64 43 6f 64 | 65 2c 20 63 6f 6d 6d 61 |mmandCod|e, comma|
|000016c0| 6e 64 50 61 72 61 6d 2c | 0d 09 09 09 09 09 09 09 |ndParam,|........|
|000016d0| 09 09 09 09 09 09 09 09 | 09 20 20 20 20 20 6d 6f |........|. mo|
|000016e0| 64 69 66 69 65 72 73 20 | 29 3b 0d 09 7d 0d 0d 0d |difiers |);..}...|
|000016f0| 73 74 61 74 69 63 20 61 | 72 48 6f 6f 6b 52 65 73 |static a|rHookRes|
|00001700| 75 6c 74 20 4f 75 72 46 | 69 65 6c 64 48 6f 6f 6b |ult OurF|ieldHook|
|00001710| 28 20 4d 6f 64 75 6c 65 | 50 61 72 61 6d 42 6c 6f |( Module|ParamBlo|
|00001720| 63 6b 2a 20 70 62 2c 20 | 61 72 4e 6f 74 65 49 44 |ck* pb, |arNoteID|
|00001730| 20 6e 6f 74 65 2c 0d 09 | 09 09 09 09 09 09 09 09 | note,..|........|
|00001740| 09 09 20 61 72 46 69 65 | 6c 64 49 44 20 66 69 65 |.. arFie|ldID fie|
|00001750| 6c 64 2c 20 61 72 46 69 | 65 6c 64 41 63 74 69 6f |ld, arFi|eldActio|
|00001760| 6e 20 61 63 74 69 6f 6e | 2c 0d 09 09 09 09 09 09 |n action|,.......|
|00001770| 09 09 09 09 09 20 63 6f | 6e 73 74 20 63 68 61 72 |..... co|nst char|
|00001780| 2a 20 63 68 6f 69 63 65 | 54 65 78 74 20 45 4e 44 |* choice|Text END|
|00001790| 50 20 29 0d 09 7b 0d 09 | 72 65 74 75 72 6e 20 28 |P )..{..|return (|
|000017a0| 28 50 6c 75 67 69 6e 2a | 29 28 70 62 2d 3e 6d 6f |(Plugin*|)(pb->mo|
|000017b0| 64 75 6c 65 52 65 66 63 | 6f 6e 29 29 2d 3e 46 69 |duleRefc|on))->Fi|
|000017c0| 65 6c 64 4e 6f 74 69 66 | 79 28 20 6e 6f 74 65 2c |eldNotif|y( note,|
|000017d0| 20 66 69 65 6c 64 2c 20 | 61 63 74 69 6f 6e 2c 0d | field, |action,.|
|000017e0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|000017f0| 09 09 63 68 6f 69 63 65 | 54 65 78 74 20 29 3b 0d |..choice|Text );.|
|00001800| 09 7d 0d 0d 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |.}...sta|tic void|
|00001810| 20 4f 75 72 54 6f 70 69 | 63 48 6f 6f 6b 28 20 4d | OurTopi|cHook( M|
|00001820| 6f 64 75 6c 65 50 61 72 | 61 6d 42 6c 6f 63 6b 2a |odulePar|amBlock*|
|00001830| 20 70 62 2c 20 61 72 54 | 6f 70 69 63 49 44 20 6e | pb, arT|opicID n|
|00001840| 65 77 54 6f 70 69 63 2c | 0d 09 09 09 09 09 09 09 |ewTopic,|........|
|00001850| 09 20 20 61 72 57 69 6e | 64 6f 77 49 44 20 6e 65 |. arWin|dowID ne|
|00001860| 77 57 69 6e 64 6f 77 2c | 20 61 72 54 6f 70 69 63 |wWindow,| arTopic|
|00001870| 41 63 74 69 6f 6e 20 61 | 63 74 69 6f 6e 20 45 4e |Action a|ction EN|
|00001880| 44 50 20 29 0d 09 7b 0d | 09 28 28 50 6c 75 67 69 |DP )..{.|.((Plugi|
|00001890| 6e 2a 29 28 70 62 2d 3e | 6d 6f 64 75 6c 65 52 65 |n*)(pb->|moduleRe|
|000018a0| 66 63 6f 6e 29 29 2d 3e | 54 6f 70 69 63 4e 6f 74 |fcon))->|TopicNot|
|000018b0| 69 66 79 28 6e 65 77 54 | 6f 70 69 63 2c 20 6e 65 |ify(newT|opic, ne|
|000018c0| 77 57 69 6e 64 6f 77 2c | 20 61 63 74 69 6f 6e 29 |wWindow,| action)|
|000018d0| 3b 0d 09 7d 0d 0d 0d 73 | 74 61 74 69 63 20 76 6f |;..}...s|tatic vo|
|000018e0| 69 64 20 4f 75 72 54 69 | 63 6b 48 6f 6f 6b 28 4d |id OurTi|ckHook(M|
|000018f0| 6f 64 75 6c 65 50 61 72 | 61 6d 42 6c 6f 63 6b 2a |odulePar|amBlock*|
|00001900| 20 70 62 20 45 4e 44 50 | 29 0d 09 7b 0d 09 28 28 | pb ENDP|)..{..((|
|00001910| 50 6c 75 67 69 6e 2a 29 | 28 70 62 2d 3e 6d 6f 64 |Plugin*)|(pb->mod|
|00001920| 75 6c 65 52 65 66 63 6f | 6e 29 29 2d 3e 54 69 63 |uleRefco|n))->Tic|
|00001930| 6b 4e 6f 74 69 66 79 28 | 29 3b 0d 09 7d 0d 0d 0d |kNotify(|);..}...|
|00001940| 73 74 61 74 69 63 20 61 | 72 48 6f 6f 6b 52 65 73 |static a|rHookRes|
|00001950| 75 6c 74 20 4f 75 72 46 | 69 6c 65 48 6f 6f 6b 28 |ult OurF|ileHook(|
|00001960| 4d 6f 64 75 6c 65 50 61 | 72 61 6d 42 6c 6f 63 6b |ModulePa|ramBlock|
|00001970| 2a 20 70 62 2c 20 61 72 | 46 69 6c 65 41 63 74 69 |* pb, ar|FileActi|
|00001980| 6f 6e 20 61 63 74 69 6f | 6e 20 45 4e 44 50 29 0d |on actio|n ENDP).|
|00001990| 09 7b 0d 09 72 65 74 75 | 72 6e 20 28 28 50 6c 75 |.{..retu|rn ((Plu|
|000019a0| 67 69 6e 2a 29 28 70 62 | 2d 3e 6d 6f 64 75 6c 65 |gin*)(pb|->module|
|000019b0| 52 65 66 63 6f 6e 29 29 | 2d 3e 46 69 6c 65 4e 6f |Refcon))|->FileNo|
|000019c0| 74 69 66 79 28 61 63 74 | 69 6f 6e 29 3b 0d 09 7d |tify(act|ion);..}|
|000019d0| 0d 0d 0d 73 74 61 74 69 | 63 20 61 72 48 6f 6f 6b |...stati|c arHook|
|000019e0| 52 65 73 75 6c 74 20 4f | 75 72 51 75 69 74 48 6f |Result O|urQuitHo|
|000019f0| 6f 6b 28 4d 6f 64 75 6c | 65 50 61 72 61 6d 42 6c |ok(Modul|eParamBl|
|00001a00| 6f 63 6b 2a 20 70 62 20 | 45 4e 44 50 29 0d 09 7b |ock* pb |ENDP)..{|
|00001a10| 0d 09 72 65 74 75 72 6e | 20 28 28 50 6c 75 67 69 |..return| ((Plugi|
|00001a20| 6e 2a 29 28 70 62 2d 3e | 6d 6f 64 75 6c 65 52 65 |n*)(pb->|moduleRe|
|00001a30| 66 63 6f 6e 29 29 2d 3e | 51 75 69 74 4e 6f 74 69 |fcon))->|QuitNoti|
|00001a40| 66 79 28 29 3b 0d 09 7d | 0d 0d 0d 73 74 61 74 69 |fy();..}|...stati|
|00001a50| 63 20 76 6f 69 64 20 4f | 75 72 41 54 4d 48 6f 6f |c void O|urATMHoo|
|00001a60| 6b 28 4d 6f 64 75 6c 65 | 50 61 72 61 6d 42 6c 6f |k(Module|ParamBlo|
|00001a70| 63 6b 2a 20 70 62 20 45 | 4e 44 50 29 0d 09 7b 0d |ck* pb E|NDP)..{.|
|00001a80| 09 28 28 50 6c 75 67 69 | 6e 2a 29 28 70 62 2d 3e |.((Plugi|n*)(pb->|
|00001a90| 6d 6f 64 75 6c 65 52 65 | 66 63 6f 6e 29 29 2d 3e |moduleRe|fcon))->|
|00001aa0| 41 54 4d 4e 6f 74 69 66 | 79 28 29 3b 0d 09 7d 0d |ATMNotif|y();..}.|
|00001ab0| 0d 0d 2f 2a 20 54 68 65 | 73 65 20 61 72 65 20 74 |../* The|se are t|
|00001ac0| 68 65 20 61 63 74 75 61 | 6c 20 68 6f 6f 6b 73 20 |he actua|l hooks |
|00001ad0| 74 68 61 74 20 77 65 20 | 70 6f 73 74 2e 20 54 68 |that we |post. Th|
|00001ae0| 65 79 20 6a 75 73 74 20 | 63 61 6c 6c 20 62 61 63 |ey just |call bac|
|00001af0| 6b 20 74 6f 20 74 68 65 | 20 0d 20 2a 20 63 6c 61 |k to the| . * cla|
|00001b00| 73 73 20 6f 62 6a 65 63 | 74 2e 20 0d 20 2a 2f 0d |ss objec|t. . */.|
|00001b10| 73 74 61 74 69 63 20 49 | 6e 74 65 67 65 72 20 4f |static I|nteger O|
|00001b20| 75 72 49 6d 70 6f 72 74 | 48 6f 6f 6b 28 20 4d 6f |urImport|Hook( Mo|
|00001b30| 64 75 6c 65 50 61 72 61 | 6d 42 6c 6f 63 6b 2a 20 |dulePara|mBlock* |
|00001b40| 70 62 2c 20 63 6f 6e 73 | 74 20 46 53 53 70 65 63 |pb, cons|t FSSpec|
|00001b50| 2a 20 2f 2a 66 69 6c 65 | 2a 2f 2c 0d 09 09 09 09 |* /*file|*/,.....|
|00001b60| 09 09 09 09 09 20 20 20 | 70 53 68 6f 72 74 20 66 |..... |pShort f|
|00001b70| 52 65 66 6e 75 6d 2c 20 | 49 6e 74 65 67 65 72 20 |Refnum, |Integer |
|00001b80| 66 6f 72 6d 61 74 49 44 | 2c 0d 09 09 09 09 09 09 |formatID|,.......|
|00001b90| 09 09 09 20 20 20 42 6f | 6f 6c 65 61 6e 20 73 6e |... Bo|olean sn|
|00001ba0| 69 66 66 2c 20 61 72 54 | 6f 70 69 63 49 44 20 64 |iff, arT|opicID d|
|00001bb0| 65 73 74 54 6f 70 69 63 | 20 45 4e 44 50 20 29 0d |estTopic| ENDP ).|
|00001bc0| 09 7b 0d 09 72 65 74 75 | 72 6e 20 28 28 50 6c 75 |.{..retu|rn ((Plu|
|00001bd0| 67 69 6e 2a 29 28 70 62 | 2d 3e 6d 6f 64 75 6c 65 |gin*)(pb|->module|
|00001be0| 52 65 66 63 6f 6e 29 29 | 2d 3e 49 6d 70 6f 72 74 |Refcon))|->Import|
|00001bf0| 4e 6f 74 69 66 79 28 20 | 66 52 65 66 6e 75 6d 2c |Notify( |fRefnum,|
|00001c00| 20 66 6f 72 6d 61 74 49 | 44 2c 0d 09 09 09 09 09 | formatI|D,......|
|00001c10| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 20 73 6e |........|..... sn|
|00001c20| 69 66 66 2c 20 64 65 73 | 74 54 6f 70 69 63 20 29 |iff, des|tTopic )|
|00001c30| 3b 0d 09 7d 20 2f 2f 20 | 4f 75 72 49 6d 70 6f 72 |;..} // |OurImpor|
|00001c40| 74 48 6f 6f 6b 0d 0d 0d | 73 74 61 74 69 63 20 49 |tHook...|static I|
|00001c50| 6e 74 65 67 65 72 20 4f | 75 72 45 78 70 6f 72 74 |nteger O|urExport|
|00001c60| 48 6f 6f 6b 28 20 4d 6f | 64 75 6c 65 50 61 72 61 |Hook( Mo|dulePara|
|00001c70| 6d 42 6c 6f 63 6b 2a 20 | 70 62 2c 20 63 6f 6e 73 |mBlock* |pb, cons|
|00001c80| 74 20 46 53 53 70 65 63 | 2a 20 2f 2a 66 69 6c 65 |t FSSpec|* /*file|
|00001c90| 2a 2f 2c 0d 09 09 09 09 | 09 09 09 09 09 09 70 53 |*/,.....|......pS|
|00001ca0| 68 6f 72 74 20 66 52 65 | 66 6e 75 6d 2c 20 49 6e |hort fRe|fnum, In|
|00001cb0| 74 65 67 65 72 20 2f 2a | 66 6f 72 6d 61 74 49 44 |teger /*|formatID|
|00001cc0| 2a 2f 2c 0d 09 09 09 09 | 09 09 09 09 09 09 61 72 |*/,.....|......ar|
|00001cd0| 45 46 54 79 70 65 20 2f | 2a 74 79 70 65 2a 2f 2c |EFType /|*type*/,|
|00001ce0| 20 61 72 54 6f 70 69 63 | 49 44 20 73 72 63 54 6f | arTopic|ID srcTo|
|00001cf0| 70 69 63 20 45 4e 44 50 | 20 29 0d 09 7b 0d 09 72 |pic ENDP| )..{..r|
|00001d00| 65 74 75 72 6e 20 28 28 | 50 6c 75 67 69 6e 2a 29 |eturn ((|Plugin*)|
|00001d10| 28 70 62 2d 3e 6d 6f 64 | 75 6c 65 52 65 66 63 6f |(pb->mod|uleRefco|
|00001d20| 6e 29 29 2d 3e 45 78 70 | 6f 72 74 4e 6f 74 69 66 |n))->Exp|ortNotif|
|00001d30| 79 28 66 52 65 66 6e 75 | 6d 2c 20 73 72 63 54 6f |y(fRefnu|m, srcTo|
|00001d40| 70 69 63 29 3b 0d 09 7d | 20 2f 2f 20 4f 75 72 45 |pic);..}| // OurE|
|00001d50| 78 70 6f 72 74 48 6f 6f | 6b 0d 0d 0d 2f 2a 2a 2a |xportHoo|k.../***|
|00001d60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001d70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001d80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001d90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001da0| 2a 2a 2a 2a 2a 2a 2f 0d | 2f 2a 2a 2a 2a 2a 2a 2a |******/.|/*******|
|00001db0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001dc0| 2a 2a 2a 2a 2a 2a 2a 20 | 53 69 6d 70 6c 65 53 74 |******* |SimpleSt|
|00001dd0| 72 65 61 6d 20 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ream ***|********|
|00001de0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001df0| 2a 2a 2f 0d 2f 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |**/./***|********|
|00001e00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0d |********|******/.|
|00001e40| 0d 2f 2a 20 54 68 69 73 | 20 69 73 20 61 20 73 69 |./* This| is a si|
|00001e50| 6d 70 6c 65 20 72 65 61 | 64 20 73 74 72 65 61 6d |mple rea|d stream|
|00001e60| 20 63 6c 61 73 73 20 66 | 6f 72 20 72 65 61 64 69 | class f|or readi|
|00001e70| 6e 67 20 66 72 6f 6d 20 | 61 20 66 69 6c 65 2e 20 |ng from |a file. |
|00001e80| 41 6c 6c 20 69 74 20 0d | 20 2a 20 72 65 61 6c 6c |All it .| * reall|
|00001e90| 79 20 64 6f 65 73 20 69 | 73 20 70 72 6f 76 69 64 |y does i|s provid|
|00001ea0| 65 20 61 20 34 4b 20 72 | 65 61 64 20 62 75 66 66 |e a 4K r|ead buff|
|00001eb0| 65 72 20 73 6f 20 74 68 | 61 74 20 6d 75 6c 74 69 |er so th|at multi|
|00001ec0| 70 6c 65 20 73 6d 61 6c | 6c 20 72 65 61 64 73 20 |ple smal|l reads |
|00001ed0| 61 72 65 0d 20 2a 20 6d | 6f 72 65 20 65 66 66 69 |are. * m|ore effi|
|00001ee0| 63 69 65 6e 74 2e 20 59 | 6f 75 20 6d 75 73 74 20 |cient. Y|ou must |
|00001ef0| 70 61 73 73 20 69 74 20 | 74 68 65 20 72 65 66 6e |pass it |the refn|
|00001f00| 75 6d 20 6f 66 20 61 20 | 66 69 6c 65 20 74 68 61 |um of a |file tha|
|00001f10| 74 20 69 73 20 61 6c 72 | 65 61 64 79 20 6f 70 65 |t is alr|eady ope|
|00001f20| 6e 2e 0d 20 2a 20 49 74 | 20 77 69 6c 6c 20 6e 6f |n.. * It| will no|
|00001f30| 74 20 63 6c 6f 73 65 20 | 74 68 65 20 66 69 6c 65 |t close |the file|
|00001f40| 2e 20 0d 20 2a 2f 0d 63 | 6c 61 73 73 20 53 69 6d |. . */.c|lass Sim|
|00001f50| 70 6c 65 53 74 72 65 61 | 6d 0d 09 7b 0d 70 75 62 |pleStrea|m..{.pub|
|00001f60| 6c 69 63 3a 0d 09 53 69 | 6d 70 6c 65 53 74 72 65 |lic:..Si|mpleStre|
|00001f70| 61 6d 28 53 68 6f 72 74 | 20 66 52 65 66 6e 75 6d |am(Short| fRefnum|
|00001f80| 2c 20 63 68 61 72 20 2a | 62 75 66 66 65 72 29 3b |, char *|buffer);|
|00001f90| 0d 09 0d 09 63 68 61 72 | 20 52 65 61 64 42 79 74 |....char| ReadByt|
|00001fa0| 65 28 29 3b 0d 09 76 6f | 69 64 20 52 65 61 64 42 |e();..vo|id ReadB|
|00001fb0| 6c 6f 63 6b 28 63 68 61 | 72 20 2a 62 75 66 66 65 |lock(cha|r *buffe|
|00001fc0| 72 2c 20 49 6e 74 65 67 | 65 72 20 6c 65 6e 67 74 |r, Integ|er lengt|
|00001fd0| 68 29 3b 0d 09 0d 09 49 | 6e 74 65 67 65 72 20 42 |h);....I|nteger B|
|00001fe0| 79 74 65 73 52 65 6d 61 | 69 6e 69 6e 67 28 29 3b |ytesRema|ining();|
|00001ff0| 0d 09 76 6f 69 64 20 52 | 65 73 65 74 28 29 3b 0d |..void R|eset();.|
|00002000| 09 0d 70 72 6f 74 65 63 | 74 65 64 3a 0d 09 73 68 |..protec|ted:..sh|
|00002010| 6f 72 74 20 66 52 65 66 | 6e 75 6d 3b 20 09 2f 2f |ort fRef|num; .//|
|00002020| 54 68 65 20 48 46 53 20 | 52 65 66 20 6e 75 6d 20 |The HFS |Ref num |
|00002030| 6f 66 20 74 68 65 20 66 | 69 6c 65 20 77 65 20 61 |of the f|ile we a|
|00002040| 72 65 20 72 65 61 64 69 | 6e 67 20 66 72 6f 6d 2e |re readi|ng from.|
|00002050| 0d 09 63 68 61 72 20 2a | 72 65 61 64 42 75 66 66 |..char *|readBuff|
|00002060| 65 72 3b 09 2f 2f 54 68 | 69 73 20 63 6c 61 73 73 |er;.//Th|is class|
|00002070| 20 72 65 61 64 73 20 62 | 79 74 65 73 20 66 72 6f | reads b|ytes fro|
|00002080| 6d 20 74 68 65 20 66 69 | 6c 65 20 34 4b 20 61 74 |m the fi|le 4K at|
|00002090| 20 61 20 74 69 6d 65 2e | 20 0d 09 09 09 09 09 09 | a time.| .......|
|000020a0| 09 2f 2f 54 68 69 73 20 | 69 73 20 74 68 65 20 70 |.//This |is the p|
|000020b0| 68 79 73 69 63 61 6c 20 | 62 75 66 66 65 72 2e 0d |hysical |buffer..|
|000020c0| 09 63 68 61 72 20 2a 62 | 75 66 45 6e 64 3b 09 09 |.char *b|ufEnd;..|
|000020d0| 2f 2f 50 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |//Pointe|r to the|
|000020e0| 20 66 69 72 73 74 20 62 | 79 74 65 20 61 66 74 65 | first b|yte afte|
|000020f0| 72 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |r the en|d of the|
|00002100| 20 62 75 66 66 65 72 0d | 09 63 68 61 72 20 2a 6e | buffer.|.char *n|
|00002110| 65 78 74 42 79 74 65 3b | 09 2f 2f 50 6f 69 6e 74 |extByte;|.//Point|
|00002120| 65 72 20 74 6f 20 74 68 | 65 20 6e 65 78 74 20 62 |er to th|e next b|
|00002130| 79 74 65 20 69 6e 20 74 | 68 65 20 62 75 66 66 65 |yte in t|he buffe|
|00002140| 72 20 74 6f 20 62 65 20 | 72 65 61 64 2e 0d 09 0d |r to be |read....|
|00002150| 09 49 6e 74 65 67 65 72 | 20 62 75 66 66 65 72 52 |.Integer| bufferR|
|00002160| 65 61 64 4f 66 66 73 65 | 74 3b 20 2f 2f 49 6e 64 |eadOffse|t; //Ind|
|00002170| 65 78 20 69 6e 20 74 68 | 65 20 66 69 6c 65 20 6f |ex in th|e file o|
|00002180| 66 20 74 68 65 20 6e 65 | 78 74 20 62 79 74 65 20 |f the ne|xt byte |
|00002190| 74 6f 20 62 65 20 62 75 | 66 66 65 72 65 64 2e 0d |to be bu|ffered..|
|000021a0| 09 49 6e 74 65 67 65 72 | 20 66 69 6c 65 53 69 7a |.Integer| fileSiz|
|000021b0| 65 3b 09 09 09 2f 2f 53 | 69 7a 65 20 6f 66 20 74 |e;...//S|ize of t|
|000021c0| 68 65 20 66 69 6c 65 20 | 69 74 73 65 6c 66 2e 0d |he file |itself..|
|000021d0| 09 0d 09 76 6f 69 64 20 | 41 64 76 61 6e 63 65 42 |...void |AdvanceB|
|000021e0| 75 66 66 65 72 28 29 3b | 0d 09 7d 3b 20 2f 2f 20 |uffer();|..}; // |
|000021f0| 53 69 6d 70 6c 65 53 74 | 72 65 61 6d 0d 0d 0d 2f |SimpleSt|ream.../|
|00002200| 2a 20 43 72 65 61 74 65 | 20 74 68 65 20 53 69 6d |* Create| the Sim|
|00002210| 70 6c 65 53 74 72 65 61 | 6d 20 6f 62 6a 65 63 74 |pleStrea|m object|
|00002220| 2e 52 65 61 64 20 74 68 | 65 20 6c 65 6e 67 74 68 |.Read th|e length|
|00002230| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 2e 20 52 65 | of the |file. Re|
|00002240| 61 64 20 74 68 65 20 66 | 69 72 73 74 20 34 4b 2e |ad the f|irst 4K.|
|00002250| 0d 20 2a 20 54 68 69 73 | 20 61 73 73 75 6d 65 73 |. * This| assumes|
|00002260| 20 74 68 61 74 20 74 68 | 65 20 66 69 6c 65 20 69 | that th|e file i|
|00002270| 73 20 61 6c 72 65 61 64 | 79 20 6f 70 65 6e 20 66 |s alread|y open f|
|00002280| 6f 72 20 72 65 61 64 2e | 20 54 68 69 73 20 63 6c |or read.| This cl|
|00002290| 61 73 73 20 77 69 6c 6c | 0d 20 2a 20 6e 6f 74 20 |ass will|. * not |
|000022a0| 6f 70 65 6e 20 6f 72 20 | 63 6c 6f 73 65 20 74 68 |open or |close th|
|000022b0| 65 20 66 69 6c 65 2e 20 | 49 74 20 64 6f 65 73 20 |e file. |It does |
|000022c0| 6e 6f 74 20 6f 77 6e 20 | 74 68 65 20 62 75 66 66 |not own |the buff|
|000022d0| 65 72 20 70 61 73 73 65 | 64 20 69 6e 2e 0d 20 2a |er passe|d in.. *|
|000022e0| 2f 0d 53 69 6d 70 6c 65 | 53 74 72 65 61 6d 3a 3a |/.Simple|Stream::|
|000022f0| 53 69 6d 70 6c 65 53 74 | 72 65 61 6d 28 53 68 6f |SimpleSt|ream(Sho|
|00002300| 72 74 20 6e 65 77 46 52 | 65 66 6e 75 6d 2c 63 68 |rt newFR|efnum,ch|
|00002310| 61 72 20 2a 6e 65 77 42 | 75 66 66 65 72 29 0d 09 |ar *newB|uffer)..|
|00002320| 7b 0d 09 66 52 65 66 6e | 75 6d 20 3d 20 6e 65 77 |{..fRefn|um = new|
|00002330| 46 52 65 66 6e 75 6d 3b | 0d 09 72 65 61 64 42 75 |FRefnum;|..readBu|
|00002340| 66 66 65 72 20 3d 20 6e | 65 77 42 75 66 66 65 72 |ffer = n|ewBuffer|
|00002350| 3b 0d 09 62 75 66 45 6e | 64 20 3d 20 72 65 61 64 |;..bufEn|d = read|
|00002360| 42 75 66 66 65 72 20 2b | 20 34 30 39 36 3b 0d 09 |Buffer +| 4096;..|
|00002370| 6e 65 78 74 42 79 74 65 | 20 3d 20 26 72 65 61 64 |nextByte| = &read|
|00002380| 42 75 66 66 65 72 5b 30 | 5d 3b 0d 09 62 75 66 66 |Buffer[0|];..buff|
|00002390| 65 72 52 65 61 64 4f 66 | 66 73 65 74 20 3d 20 30 |erReadOf|fset = 0|
|000023a0| 3b 0d 09 0d 09 6c 6f 6e | 67 20 74 65 6d 70 3b 0d |;....lon|g temp;.|
|000023b0| 09 47 65 74 45 4f 46 28 | 66 52 65 66 6e 75 6d 2c |.GetEOF(|fRefnum,|
|000023c0| 26 74 65 6d 70 29 3b 0d | 09 66 69 6c 65 53 69 7a |&temp);.|.fileSiz|
|000023d0| 65 20 3d 20 28 49 6e 74 | 65 67 65 72 29 74 65 6d |e = (Int|eger)tem|
|000023e0| 70 3b 0d 09 0d 09 2f 2f | 52 65 73 65 74 20 74 68 |p;....//|Reset th|
|000023f0| 65 20 66 69 6c 65 20 74 | 6f 20 30 2e 0d 09 53 65 |e file t|o 0...Se|
|00002400| 74 46 50 6f 73 28 66 52 | 65 66 6e 75 6d 2c 66 73 |tFPos(fR|efnum,fs|
|00002410| 46 72 6f 6d 53 74 61 72 | 74 2c 30 29 3b 0d 09 41 |FromStar|t,0);..A|
|00002420| 64 76 61 6e 63 65 42 75 | 66 66 65 72 28 29 3b 0d |dvanceBu|ffer();.|
|00002430| 09 7d 20 2f 2f 20 53 69 | 6d 70 6c 65 53 74 72 65 |.} // Si|mpleStre|
|00002440| 61 6d 20 63 6f 6e 73 74 | 72 75 63 74 6f 72 0d 0d |am const|ructor..|
|00002450| 0d 2f 2a 20 52 65 73 65 | 74 20 74 68 65 20 66 69 |./* Rese|t the fi|
|00002460| 6c 65 20 61 6e 64 20 74 | 68 65 20 63 61 63 68 65 |le and t|he cache|
|00002470| 20 74 6f 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e | to the |beginnin|
|00002480| 67 2e 20 2a 2f 0d 76 6f | 69 64 20 53 69 6d 70 6c |g. */.vo|id Simpl|
|00002490| 65 53 74 72 65 61 6d 3a | 3a 52 65 73 65 74 28 29 |eStream:|:Reset()|
|000024a0| 0d 09 7b 0d 09 2f 2f 52 | 65 73 65 74 20 74 68 65 |..{..//R|eset the|
|000024b0| 20 66 69 6c 65 0d 09 53 | 65 74 46 50 6f 73 28 66 | file..S|etFPos(f|
|000024c0| 52 65 66 6e 75 6d 2c 66 | 73 46 72 6f 6d 53 74 61 |Refnum,f|sFromSta|
|000024d0| 72 74 2c 30 29 3b 0d 09 | 0d 09 2f 2f 52 65 73 65 |rt,0);..|..//Rese|
|000024e0| 74 20 74 68 65 20 63 61 | 63 68 65 0d 09 6e 65 78 |t the ca|che..nex|
|000024f0| 74 42 79 74 65 20 3d 20 | 26 72 65 61 64 42 75 66 |tByte = |&readBuf|
|00002500| 66 65 72 5b 30 5d 3b 0d | 09 62 75 66 66 65 72 52 |fer[0];.|.bufferR|
|00002510| 65 61 64 4f 66 66 73 65 | 74 20 3d 20 30 3b 0d 09 |eadOffse|t = 0;..|
|00002520| 41 64 76 61 6e 63 65 42 | 75 66 66 65 72 28 29 3b |AdvanceB|uffer();|
|00002530| 0d 09 7d 20 2f 2f 20 52 | 65 73 65 74 0d 0d 0d 2f |..} // R|eset.../|
|00002540| 2a 20 41 64 76 61 6e 63 | 65 20 74 68 65 20 62 75 |* Advanc|e the bu|
|00002550| 66 66 65 72 20 62 79 20 | 34 4b 20 6f 72 20 74 6f |ffer by |4K or to|
|00002560| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00002570| 66 69 6c 65 2c 20 69 66 | 20 74 68 65 72 65 20 61 |file, if| there a|
|00002580| 72 65 20 6e 6f 20 0d 20 | 2a 20 65 72 72 6f 72 20 |re no . |* error |
|00002590| 63 6f 6e 64 69 74 69 6f | 6e 73 2e 20 52 65 73 65 |conditio|ns. Rese|
|000025a0| 74 20 74 68 65 20 6e 65 | 78 74 20 62 79 74 65 20 |t the ne|xt byte |
|000025b0| 70 6f 69 6e 74 65 72 2e | 0d 20 2a 2f 0d 76 6f 69 |pointer.|. */.voi|
|000025c0| 64 20 53 69 6d 70 6c 65 | 53 74 72 65 61 6d 3a 3a |d Simple|Stream::|
|000025d0| 41 64 76 61 6e 63 65 42 | 75 66 66 65 72 28 29 0d |AdvanceB|uffer().|
|000025e0| 09 7b 0d 09 69 66 20 28 | 66 69 6c 65 53 69 7a 65 |.{..if (|fileSize|
|000025f0| 20 3c 20 31 29 0d 09 09 | 72 65 74 75 72 6e 3b 0d | < 1)...|return;.|
|00002600| 09 09 0d 09 6c 6f 6e 67 | 20 62 79 74 65 73 54 6f |....long| bytesTo|
|00002610| 52 65 61 64 20 3d 20 4d | 69 6e 28 34 30 39 36 2c |Read = M|in(4096,|
|00002620| 20 66 69 6c 65 53 69 7a | 65 20 2d 20 62 75 66 66 | fileSiz|e - buff|
|00002630| 65 72 52 65 61 64 4f 66 | 66 73 65 74 29 3b 0d 09 |erReadOf|fset);..|
|00002640| 0d 09 69 66 20 28 62 79 | 74 65 73 54 6f 52 65 61 |..if (by|tesToRea|
|00002650| 64 20 3d 3d 20 30 29 0d | 09 09 7b 0d 09 09 66 69 |d == 0).|..{...fi|
|00002660| 6c 65 53 69 7a 65 20 3d | 20 2d 31 3b 0d 09 09 72 |leSize =| -1;...r|
|00002670| 65 74 75 72 6e 3b 0d 09 | 09 7d 0d 09 09 0d 09 69 |eturn;..|.}.....i|
|00002680| 66 20 28 46 53 52 65 61 | 64 28 66 52 65 66 6e 75 |f (FSRea|d(fRefnu|
|00002690| 6d 2c 26 62 79 74 65 73 | 54 6f 52 65 61 64 2c 72 |m,&bytes|ToRead,r|
|000026a0| 65 61 64 42 75 66 66 65 | 72 29 20 21 3d 20 6e 6f |eadBuffe|r) != no|
|000026b0| 45 72 72 29 0d 09 09 66 | 69 6c 65 53 69 7a 65 20 |Err)...f|ileSize |
|000026c0| 3d 20 2d 31 3b 0d 09 0d | 0d 09 6e 65 78 74 42 79 |= -1;...|..nextBy|
|000026d0| 74 65 20 3d 20 72 65 61 | 64 42 75 66 66 65 72 3b |te = rea|dBuffer;|
|000026e0| 0d 09 62 75 66 66 65 72 | 52 65 61 64 4f 66 66 73 |..buffer|ReadOffs|
|000026f0| 65 74 20 2b 3d 20 28 49 | 6e 74 65 67 65 72 29 62 |et += (I|nteger)b|
|00002700| 79 74 65 73 54 6f 52 65 | 61 64 3b 0d 09 62 75 66 |ytesToRe|ad;..buf|
|00002710| 45 6e 64 20 3d 20 72 65 | 61 64 42 75 66 66 65 72 |End = re|adBuffer|
|00002720| 20 2b 20 62 79 74 65 73 | 54 6f 52 65 61 64 3b 0d | + bytes|ToRead;.|
|00002730| 09 7d 20 2f 2f 20 41 64 | 76 61 6e 63 65 42 75 66 |.} // Ad|vanceBuf|
|00002740| 66 65 72 0d 0d 0d 2f 2a | 20 52 65 74 75 72 6e 20 |fer.../*| Return |
|00002750| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 62 79 |the numb|er of by|
|00002760| 74 65 73 20 72 65 6d 61 | 69 6e 69 6e 67 20 69 6e |tes rema|ining in|
|00002770| 20 74 68 65 20 66 69 6c | 65 2c 20 61 66 74 65 72 | the fil|e, after|
|00002780| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6d 61 72 | the cur|rent mar|
|00002790| 6b 2e 20 2a 2f 0d 49 6e | 74 65 67 65 72 20 53 69 |k. */.In|teger Si|
|000027a0| 6d 70 6c 65 53 74 72 65 | 61 6d 3a 3a 42 79 74 65 |mpleStre|am::Byte|
|000027b0| 73 52 65 6d 61 69 6e 69 | 6e 67 28 29 0d 09 7b 0d |sRemaini|ng()..{.|
|000027c0| 09 69 66 20 28 66 69 6c | 65 53 69 7a 65 20 3c 20 |.if (fil|eSize < |
|000027d0| 31 29 0d 09 09 72 65 74 | 75 72 6e 20 30 3b 0d 09 |1)...ret|urn 0;..|
|000027e0| 09 0d 09 2f 2f 72 65 74 | 75 72 6e 20 74 68 65 20 |...//ret|urn the |
|000027f0| 20 61 6d 6f 75 6e 74 20 | 6c 65 66 74 20 74 6f 20 | amount |left to |
|00002800| 72 65 61 64 2c 20 70 6c | 75 73 20 77 68 61 74 27 |read, pl|us what'|
|00002810| 73 20 6c 65 66 74 20 69 | 6e 20 74 68 65 20 62 75 |s left i|n the bu|
|00002820| 66 66 65 72 2e 0d 09 72 | 65 74 75 72 6e 20 28 66 |ffer...r|eturn (f|
|00002830| 69 6c 65 53 69 7a 65 20 | 2d 20 62 75 66 66 65 72 |ileSize |- buffer|
|00002840| 52 65 61 64 4f 66 66 73 | 65 74 29 20 2b 20 28 62 |ReadOffs|et) + (b|
|00002850| 75 66 45 6e 64 20 2d 20 | 6e 65 78 74 42 79 74 65 |ufEnd - |nextByte|
|00002860| 29 3b 0d 09 7d 20 2f 2f | 20 42 79 74 65 73 52 65 |);..} //| BytesRe|
|00002870| 6d 61 69 6e 69 6e 67 0d | 0d 0d 2f 2a 20 52 65 61 |maining.|../* Rea|
|00002880| 64 20 74 68 65 20 6e 65 | 78 74 20 62 79 74 65 20 |d the ne|xt byte |
|00002890| 66 72 6f 6d 20 74 68 65 | 20 66 69 6c 65 2e 20 41 |from the| file. A|
|000028a0| 64 76 61 6e 63 65 20 74 | 68 65 20 70 6f 69 6e 74 |dvance t|he point|
|000028b0| 65 72 20 69 66 20 6e 65 | 65 64 65 64 2e 20 54 68 |er if ne|eded. Th|
|000028c0| 69 73 20 6d 61 79 0d 20 | 2a 20 6c 65 61 76 65 20 |is may. |* leave |
|000028d0| 74 68 65 20 62 75 66 66 | 65 72 20 65 6d 70 74 79 |the buff|er empty|
|000028e0| 20 61 6e 64 20 6e 6f 74 | 20 61 64 76 61 6e 63 65 | and not| advance|
|000028f0| 2e 20 0d 20 2a 2f 0d 63 | 68 61 72 20 53 69 6d 70 |. . */.c|har Simp|
|00002900| 6c 65 53 74 72 65 61 6d | 3a 3a 52 65 61 64 42 79 |leStream|::ReadBy|
|00002910| 74 65 28 29 0d 09 7b 0d | 09 69 66 20 28 6e 65 78 |te()..{.|.if (nex|
|00002920| 74 42 79 74 65 20 3e 3d | 20 62 75 66 45 6e 64 29 |tByte >=| bufEnd)|
|00002930| 0d 09 09 41 64 76 61 6e | 63 65 42 75 66 66 65 72 |...Advan|ceBuffer|
|00002940| 28 29 3b 0d 09 0d 09 72 | 65 74 75 72 6e 20 2a 28 |();....r|eturn *(|
|00002950| 6e 65 78 74 42 79 74 65 | 2b 2b 29 3b 0d 09 7d 20 |nextByte|++);..} |
|00002960| 2f 2f 20 52 65 61 64 42 | 79 74 65 0d 0d 0d 2f 2a |// ReadB|yte.../*|
|00002970| 20 52 65 61 64 20 61 20 | 62 6c 6f 63 6b 20 6f 66 | Read a |block of|
|00002980| 20 74 68 65 20 67 69 76 | 65 6e 20 6c 65 6e 67 74 | the giv|en lengt|
|00002990| 68 20 66 72 6f 6d 20 74 | 68 65 20 66 69 6c 65 2e |h from t|he file.|
|000029a0| 20 54 68 65 20 62 75 66 | 66 65 72 20 6d 75 73 74 | The buf|fer must|
|000029b0| 20 62 65 20 61 74 20 6c | 65 61 73 74 20 61 73 20 | be at l|east as |
|000029c0| 0d 20 2a 20 6c 6f 6e 67 | 20 61 73 20 74 68 65 20 |. * long| as the |
|000029d0| 70 61 73 73 65 64 20 6c | 65 6e 67 74 68 2e 20 54 |passed l|ength. T|
|000029e0| 68 65 20 6c 65 6e 67 74 | 68 20 63 61 6e 20 62 65 |he lengt|h can be|
|000029f0| 20 61 6e 79 20 73 69 7a | 65 2e 0d 20 2a 2f 0d 76 | any siz|e.. */.v|
|00002a00| 6f 69 64 20 53 69 6d 70 | 6c 65 53 74 72 65 61 6d |oid Simp|leStream|
|00002a10| 3a 3a 52 65 61 64 42 6c | 6f 63 6b 28 63 68 61 72 |::ReadBl|ock(char|
|00002a20| 20 2a 62 75 66 66 65 72 | 2c 20 49 6e 74 65 67 65 | *buffer|, Intege|
|00002a30| 72 20 6c 65 6e 67 74 68 | 29 0d 09 7b 0d 09 49 6e |r length|)..{..In|
|00002a40| 74 65 67 65 72 20 62 79 | 74 65 73 54 6f 52 65 61 |teger by|tesToRea|
|00002a50| 64 20 3d 20 6c 65 6e 67 | 74 68 3b 0d 09 0d 09 77 |d = leng|th;....w|
|00002a60| 68 69 6c 65 20 28 62 79 | 74 65 73 54 6f 52 65 61 |hile (by|tesToRea|
|00002a70| 64 20 3e 20 30 29 0d 09 | 09 7b 0d 09 09 49 6e 74 |d > 0)..|.{...Int|
|00002a80| 65 67 65 72 20 62 79 74 | 65 73 49 6e 43 75 72 42 |eger byt|esInCurB|
|00002a90| 75 66 66 65 72 20 3d 20 | 62 75 66 45 6e 64 20 2d |uffer = |bufEnd -|
|00002aa0| 20 6e 65 78 74 42 79 74 | 65 3b 0d 09 09 49 6e 74 | nextByt|e;...Int|
|00002ab0| 65 67 65 72 20 62 79 74 | 65 73 4f 6e 54 68 69 73 |eger byt|esOnThis|
|00002ac0| 52 65 61 64 20 3d 20 4d | 69 6e 28 62 79 74 65 73 |Read = M|in(bytes|
|00002ad0| 54 6f 52 65 61 64 2c 62 | 79 74 65 73 49 6e 43 75 |ToRead,b|ytesInCu|
|00002ae0| 72 42 75 66 66 65 72 29 | 3b 0d 09 09 69 66 20 28 |rBuffer)|;...if (|
|00002af0| 62 79 74 65 73 4f 6e 54 | 68 69 73 52 65 61 64 20 |bytesOnT|hisRead |
|00002b00| 3e 20 30 29 0d 09 09 09 | 7b 0d 09 09 09 42 6c 6f |> 0)....|{....Blo|
|00002b10| 63 6b 4d 6f 76 65 28 6e | 65 78 74 42 79 74 65 2c |ckMove(n|extByte,|
|00002b20| 62 75 66 66 65 72 2c 62 | 79 74 65 73 4f 6e 54 68 |buffer,b|ytesOnTh|
|00002b30| 69 73 52 65 61 64 29 3b | 0d 09 09 09 6e 65 78 74 |isRead);|....next|
|00002b40| 42 79 74 65 20 2b 3d 20 | 62 79 74 65 73 4f 6e 54 |Byte += |bytesOnT|
|00002b50| 68 69 73 52 65 61 64 3b | 0d 09 09 09 62 75 66 66 |hisRead;|....buff|
|00002b60| 65 72 20 2b 3d 20 62 79 | 74 65 73 4f 6e 54 68 69 |er += by|tesOnThi|
|00002b70| 73 52 65 61 64 3b 0d 09 | 09 09 62 79 74 65 73 54 |sRead;..|..bytesT|
|00002b80| 6f 52 65 61 64 20 2d 3d | 20 62 79 74 65 73 4f 6e |oRead -=| bytesOn|
|00002b90| 54 68 69 73 52 65 61 64 | 3b 0d 09 09 09 7d 0d 09 |ThisRead|;....}..|
|00002ba0| 09 0d 09 09 69 66 20 28 | 6e 65 78 74 42 79 74 65 |....if (|nextByte|
|00002bb0| 20 3e 3d 20 62 75 66 45 | 6e 64 29 0d 09 09 09 41 | >= bufE|nd)....A|
|00002bc0| 64 76 61 6e 63 65 42 75 | 66 66 65 72 28 29 3b 0d |dvanceBu|ffer();.|
|00002bd0| 09 09 0d 09 09 7d 20 2f | 2f 20 77 68 69 6c 65 20 |.....} /|/ while |
|00002be0| 28 62 79 74 65 73 54 6f | 52 65 61 64 20 3e 20 30 |(bytesTo|Read > 0|
|00002bf0| 29 0d 09 0d 09 7d 20 2f | 2f 20 52 65 61 64 42 6c |)....} /|/ ReadBl|
|00002c00| 6f 63 6b 0d 0d 0d 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ock.../*|********|
|00002c10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c50| 2f 0d 2f 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/./*****|********|
|00002c60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c70| 2a 2a 2a 2a 20 50 6c 75 | 67 69 6e 20 2a 2a 2a 2a |**** Plu|gin ****|
|00002c80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002c90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0d 2f 2a |********|****/./*|
|00002ca0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002cb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002cc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002ce0| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0d 0d 2f 2a 20 43 6f |********|/../* Co|
|00002cf0| 6e 73 74 72 75 63 74 20 | 61 20 50 6c 75 67 69 6e |nstruct |a Plugin|
|00002d00| 20 6f 62 6a 65 63 74 2e | 20 20 54 68 69 73 20 69 | object.| This i|
|00002d10| 73 20 63 61 6c 6c 65 64 | 20 6f 6e 63 65 2c 20 66 |s called| once, f|
|00002d20| 72 6f 6d 20 74 68 65 20 | 4f 75 72 4d 6f 64 75 6c |rom the |OurModul|
|00002d30| 65 52 6f 6f 74 0d 20 2a | 20 66 75 6e 63 74 69 6f |eRoot. *| functio|
|00002d40| 6e 2c 20 77 68 65 6e 20 | 74 68 65 20 6d 6f 64 75 |n, when |the modu|
|00002d50| 6c 65 20 69 73 20 69 6e | 69 74 69 61 6c 69 7a 65 |le is in|itialize|
|00002d60| 64 20 28 69 2e 65 2e 20 | 61 74 20 61 70 70 6c 69 |d (i.e. |at appli|
|00002d70| 63 61 74 69 6f 6e 20 73 | 74 61 72 74 75 70 20 74 |cation s|tartup t|
|00002d80| 69 6d 65 29 2e 0d 20 2a | 2f 0d 50 6c 75 67 69 6e |ime).. *|/.Plugin|
|00002d90| 3a 3a 50 6c 75 67 69 6e | 28 63 6f 6e 73 74 20 41 |::Plugin|(const A|
|00002da0| 72 72 61 6e 67 65 43 61 | 6c 6c 62 61 63 6b 54 62 |rrangeCa|llbackTb|
|00002db0| 6c 2a 20 74 68 65 43 61 | 6c 6c 73 29 0d 09 7b 0d |l* theCa|lls)..{.|
|00002dc0| 09 2f 2f 20 52 65 63 6f | 72 64 20 74 68 65 20 63 |.// Reco|rd the c|
|00002dd0| 61 6c 6c 62 61 63 6b 20 | 74 61 62 6c 65 20 66 6f |allback |table fo|
|00002de0| 72 20 66 75 74 75 72 65 | 20 75 73 65 2e 0d 09 63 |r future| use...c|
|00002df0| 61 6c 6c 73 20 3d 20 74 | 68 65 43 61 6c 6c 73 3b |alls = t|heCalls;|
|00002e00| 0d 09 0d 09 2f 2a 20 54 | 68 65 73 65 20 63 6f 6d |..../* T|hese com|
|00002e10| 6d 61 6e 64 73 2c 20 69 | 66 20 75 6e 2d 63 6f 6d |mands, i|f un-com|
|00002e20| 6d 65 6e 74 65 64 2d 6f | 75 74 2c 20 72 65 67 69 |mented-o|ut, regi|
|00002e30| 73 74 65 72 20 74 68 69 | 73 20 70 6c 75 67 69 6e |ster thi|s plugin|
|00002e40| 20 74 6f 20 62 65 20 63 | 61 6c 6c 65 64 0d 09 20 | to be c|alled.. |
|00002e50| 2a 20 62 79 20 41 72 72 | 61 6e 67 65 20 77 68 65 |* by Arr|ange whe|
|00002e60| 6e 20 76 61 72 69 6f 75 | 73 20 65 76 65 6e 74 73 |n variou|s events|
|00002e70| 20 6f 63 63 75 72 2e 20 | 20 46 6f 72 20 65 78 61 | occur. | For exa|
|00002e80| 6d 70 6c 65 2c 20 69 66 | 20 79 6f 75 20 75 6e 2d |mple, if| you un-|
|00002e90| 63 6f 6d 6d 65 6e 74 2d | 6f 75 74 0d 09 20 2a 20 |comment-|out.. * |
|00002ea0| 74 68 65 20 63 61 6c 6c | 20 74 6f 20 53 65 74 43 |the call| to SetC|
|00002eb0| 6c 69 63 6b 48 6f 6f 6b | 2c 20 74 68 65 6e 20 50 |lickHook|, then P|
|00002ec0| 6c 75 67 69 6e 3a 3a 43 | 6c 69 63 6b 4e 6f 74 69 |lugin::C|lickNoti|
|00002ed0| 66 79 20 77 69 6c 6c 20 | 62 65 20 63 61 6c 6c 65 |fy will |be calle|
|00002ee0| 64 0d 09 20 2a 20 77 68 | 65 6e 65 76 65 72 20 74 |d.. * wh|enever t|
|00002ef0| 68 65 20 75 73 65 72 20 | 63 6c 69 63 6b 73 20 69 |he user |clicks i|
|00002f00| 6e 20 61 6e 79 20 6f 66 | 20 74 68 65 20 6c 6f 63 |n any of| the loc|
|00002f10| 61 74 69 6f 6e 73 20 64 | 65 73 63 72 69 62 65 64 |ations d|escribed|
|00002f20| 20 69 6e 20 74 68 65 0d | 09 20 2a 20 61 72 43 6c | in the.|. * arCl|
|00002f30| 69 63 6b 4c 6f 63 61 74 | 69 6f 6e 20 65 6e 75 6d |ickLocat|ion enum|
|00002f40| 2e 0d 09 20 2a 2f 0d 09 | 2f 2f 20 63 61 6c 6c 73 |... */..|// calls|
|00002f50| 2d 3e 75 69 2d 3e 53 65 | 74 43 6c 69 63 6b 48 6f |->ui->Se|tClickHo|
|00002f60| 6f 6b 28 4f 75 72 43 6c | 69 63 6b 48 6f 6f 6b 2c |ok(OurCl|ickHook,|
|00002f70| 20 30 2c 20 74 72 75 65 | 29 3b 0d 09 2f 2f 20 63 | 0, true|);..// c|
|00002f80| 61 6c 6c 73 2d 3e 75 69 | 2d 3e 53 65 74 4b 65 79 |alls->ui|->SetKey|
|00002f90| 48 6f 6f 6b 20 20 28 4f | 75 72 4b 65 79 48 6f 6f |Hook (O|urKeyHoo|
|00002fa0| 6b 2c 20 20 20 30 2c 20 | 74 72 75 65 2c 20 63 68 |k, 0, |true, ch|
|00002fb0| 61 72 46 69 6c 74 65 72 | 2c 20 6b 65 79 46 69 6c |arFilter|, keyFil|
|00002fc0| 74 65 72 2c 20 6d 6f 64 | 46 69 6c 74 65 72 29 3b |ter, mod|Filter);|
|00002fd0| 0d 09 2f 2f 20 63 61 6c | 6c 73 2d 3e 75 69 2d 3e |..// cal|ls->ui->|
|00002fe0| 53 65 74 4d 65 6e 75 48 | 6f 6f 6b 20 28 4f 75 72 |SetMenuH|ook (Our|
|00002ff0| 4d 65 6e 75 48 6f 6f 6b | 2c 20 20 30 2c 20 74 72 |MenuHook|, 0, tr|
|00003000| 75 65 2c 20 77 68 69 63 | 68 43 6f 6d 6d 61 6e 64 |ue, whic|hCommand|
|00003010| 29 3b 0d 09 2f 2f 20 63 | 61 6c 6c 73 2d 3e 75 69 |);..// c|alls->ui|
|00003020| 2d 3e 53 65 74 46 69 65 | 6c 64 48 6f 6f 6b 28 4f |->SetFie|ldHook(O|
|00003030| 75 72 46 69 65 6c 64 48 | 6f 6f 6b 2c 20 30 2c 20 |urFieldH|ook, 0, |
|00003040| 74 72 75 65 2c 20 77 68 | 69 63 68 46 69 65 6c 64 |true, wh|ichField|
|00003050| 29 3b 0d 09 2f 2f 20 63 | 61 6c 6c 73 2d 3e 75 69 |);..// c|alls->ui|
|00003060| 2d 3e 53 65 74 54 6f 70 | 69 63 48 6f 6f 6b 28 4f |->SetTop|icHook(O|
|00003070| 75 72 54 6f 70 69 63 48 | 6f 6f 6b 2c 20 30 2c 20 |urTopicH|ook, 0, |
|00003080| 74 72 75 65 29 3b 0d 09 | 2f 2f 20 63 61 6c 6c 73 |true);..|// calls|
|00003090| 2d 3e 75 69 2d 3e 53 65 | 74 54 69 63 6b 48 6f 6f |->ui->Se|tTickHoo|
|000030a0| 6b 20 28 4f 75 72 54 69 | 63 6b 48 6f 6f 6b 2c 20 |k (OurTi|ckHook, |
|000030b0| 20 30 2c 20 74 72 75 65 | 29 3b 0d 09 2f 2f 20 63 | 0, true|);..// c|
|000030c0| 61 6c 6c 73 2d 3e 75 69 | 2d 3e 53 65 74 46 69 6c |alls->ui|->SetFil|
|000030d0| 65 48 6f 6f 6b 20 28 4f | 75 72 46 69 6c 65 48 6f |eHook (O|urFileHo|
|000030e0| 6f 6b 2c 20 20 30 2c 20 | 74 72 75 65 29 3b 0d 09 |ok, 0, |true);..|
|000030f0| 2f 2f 20 63 61 6c 6c 73 | 2d 3e 75 69 2d 3e 53 65 |// calls|->ui->Se|
|00003100| 74 51 75 69 74 48 6f 6f | 6b 20 28 4f 75 72 51 75 |tQuitHoo|k (OurQu|
|00003110| 69 74 48 6f 6f 6b 2c 20 | 20 30 2c 20 74 72 75 65 |itHook, | 0, true|
|00003120| 29 3b 0d 09 2f 2f 20 63 | 61 6c 6c 73 2d 3e 75 69 |);..// c|alls->ui|
|00003130| 2d 3e 53 65 74 41 54 4d | 48 6f 6f 6b 20 20 28 4f |->SetATM|Hook (O|
|00003140| 75 72 41 54 4d 48 6f 6f | 6b 2c 20 20 20 30 2c 20 |urATMHoo|k, 0, |
|00003150| 74 72 75 65 29 3b 0d 09 | 0d 09 2f 2f 20 41 64 64 |true);..|..// Add|
|00003160| 20 61 6e 20 69 74 65 6d | 20 74 6f 20 74 68 65 20 | an item| to the |
|00003170| 41 62 6f 75 74 20 50 6c | 75 67 69 6e 73 20 6d 65 |About Pl|ugins me|
|00003180| 6e 75 20 66 6f 72 20 74 | 68 69 73 20 70 6c 75 67 |nu for t|his plug|
|00003190| 69 6e 2e 0d 09 63 61 6c | 6c 73 2d 3e 75 69 2d 3e |in...cal|ls->ui->|
|000031a0| 41 64 64 4d 65 6e 75 49 | 74 65 6d 28 6d 50 6c 75 |AddMenuI|tem(mPlu|
|000031b0| 67 69 6e 41 62 6f 75 74 | 2c 20 22 41 62 6f 75 74 |ginAbout|, "About|
|000031c0| 20 4d 65 65 74 69 6e 67 | 20 4d 61 6b 65 72 22 2c | Meeting| Maker",|
|000031d0| 20 30 2c 20 61 62 6f 75 | 74 43 6d 64 43 6f 64 65 | 0, abou|tCmdCode|
|000031e0| 2c 20 30 29 3b 0d 09 0d | 09 2f 2f 20 52 65 67 69 |, 0);...|.// Regi|
|000031f0| 73 74 65 72 20 6f 75 72 | 73 65 6c 76 65 73 20 74 |ster our|selves t|
|00003200| 6f 20 62 65 20 63 61 6c | 6c 65 64 20 77 68 65 6e |o be cal|led when|
|00003210| 20 6f 75 72 20 41 62 6f | 75 74 20 63 6f 6d 6d 61 | our Abo|ut comma|
|00003220| 6e 64 20 69 73 20 63 68 | 6f 73 65 6e 2e 0d 09 63 |nd is ch|osen...c|
|00003230| 61 6c 6c 73 2d 3e 75 69 | 2d 3e 53 65 74 4d 65 6e |alls->ui|->SetMen|
|00003240| 75 48 6f 6f 6b 28 4f 75 | 72 4d 65 6e 75 48 6f 6f |uHook(Ou|rMenuHoo|
|00003250| 6b 2c 20 30 2c 20 74 72 | 75 65 2c 20 61 62 6f 75 |k, 0, tr|ue, abou|
|00003260| 74 43 6d 64 43 6f 64 65 | 29 3b 0d 09 0d 09 2f 2f |tCmdCode|);....//|
|00003270| 20 52 65 67 69 73 74 65 | 72 20 68 6f 6f 6b 73 20 | Registe|r hooks |
|00003280| 66 6f 72 20 6f 75 72 20 | 69 6d 70 6f 72 74 20 61 |for our |import a|
|00003290| 6e 64 20 65 78 70 6f 72 | 74 20 66 6f 72 6d 61 74 |nd expor|t format|
|000032a0| 73 2e 0d 09 4f 53 54 79 | 70 65 20 74 65 78 74 54 |s...OSTy|pe textT|
|000032b0| 79 70 65 20 3d 20 27 54 | 45 58 54 27 3b 0d 09 0d |ype = 'T|EXT';...|
|000032c0| 09 63 68 61 72 20 62 75 | 66 66 65 72 5b 32 35 36 |.char bu|ffer[256|
|000032d0| 5d 3b 0d 09 67 65 74 69 | 6e 64 73 74 72 69 6e 67 |];..geti|ndstring|
|000032e0| 28 26 62 75 66 66 65 72 | 5b 30 5d 2c 72 4d 4d 49 |(&buffer|[0],rMMI|
|000032f0| 6d 70 6f 72 74 45 78 70 | 6f 72 74 4e 61 6d 65 73 |mportExp|ortNames|
|00003300| 2c 72 49 6d 70 6f 72 74 | 4e 61 6d 65 29 3b 20 0d |,rImport|Name); .|
|00003310| 09 63 61 6c 6c 73 2d 3e | 75 69 2d 3e 52 65 67 69 |.calls->|ui->Regi|
|00003320| 73 74 65 72 49 6d 70 6f | 72 74 46 6f 72 6d 61 74 |sterImpo|rtFormat|
|00003330| 28 20 62 75 66 66 65 72 | 2c 20 27 4d 4d 6b 72 27 |( buffer|, 'MMkr'|
|00003340| 2c 20 26 74 65 78 74 54 | 79 70 65 2c 20 31 2c 0d |, &textT|ype, 1,.|
|00003350| 09 09 09 09 09 09 09 09 | 09 09 09 09 4f 75 72 49 |........|....OurI|
|00003360| 6d 70 6f 72 74 48 6f 6f | 6b 2c 20 30 20 29 3b 0d |mportHoo|k, 0 );.|
|00003370| 09 09 09 09 09 09 09 09 | 09 09 09 09 0d 09 67 65 |........|......ge|
|00003380| 74 69 6e 64 73 74 72 69 | 6e 67 28 26 62 75 66 66 |tindstri|ng(&buff|
|00003390| 65 72 5b 30 5d 2c 72 4d | 4d 49 6d 70 6f 72 74 45 |er[0],rM|MImportE|
|000033a0| 78 70 6f 72 74 4e 61 6d | 65 73 2c 72 45 78 70 6f |xportNam|es,rExpo|
|000033b0| 72 74 4e 61 6d 65 29 3b | 20 0d 09 63 61 6c 6c 73 |rtName);| ..calls|
|000033c0| 2d 3e 75 69 2d 3e 52 65 | 67 69 73 74 65 72 45 78 |->ui->Re|gisterEx|
|000033d0| 70 6f 72 74 46 6f 72 6d | 61 74 28 20 62 75 66 66 |portForm|at( buff|
|000033e0| 65 72 2c 20 27 4d 4d 6b | 72 27 2c 20 65 66 45 78 |er, 'MMk|r', efEx|
|000033f0| 70 6f 72 74 2c 0d 09 09 | 09 09 09 09 09 09 09 09 |port,...|........|
|00003400| 09 09 4f 75 72 45 78 70 | 6f 72 74 48 6f 6f 6b 2c |..OurExp|ortHook,|
|00003410| 20 30 2c 20 27 54 45 58 | 54 27 2c 20 27 4d 4d 73 | 0, 'TEX|T', 'MMs|
|00003420| 73 27 20 29 3b 0d 09 7d | 20 2f 2f 20 50 6c 75 67 |s' );..}| // Plug|
|00003430| 69 6e 20 63 6f 6e 73 74 | 72 75 63 74 6f 72 0d 0d |in const|ructor..|
|00003440| 0d 2f 2a 20 44 69 73 70 | 6f 73 65 20 6f 66 20 61 |./* Disp|ose of a|
|00003450| 20 50 6c 75 67 69 6e 20 | 6f 62 6a 65 63 74 2e 20 | Plugin |object. |
|00003460| 20 54 68 69 73 20 69 73 | 20 63 61 6c 6c 65 64 20 | This is| called |
|00003470| 77 68 65 6e 20 41 72 72 | 61 6e 67 65 20 74 65 72 |when Arr|ange ter|
|00003480| 6d 69 6e 61 74 65 73 2e | 20 20 59 6f 75 0d 20 2a |minates.| You. *|
|00003490| 20 73 68 6f 75 6c 64 20 | 66 72 65 65 20 75 70 20 | should |free up |
|000034a0| 61 6e 79 20 64 61 74 61 | 20 73 74 72 75 63 74 75 |any data| structu|
|000034b0| 72 65 73 20 77 68 69 63 | 68 20 79 6f 75 20 61 6c |res whic|h you al|
|000034c0| 6c 6f 63 61 74 69 6f 6e | 20 69 6e 20 74 68 65 20 |location| in the |
|000034d0| 50 6c 75 67 69 6e 0d 20 | 2a 20 63 6f 6e 73 74 72 |Plugin. |* constr|
|000034e0| 75 63 74 6f 72 20 28 61 | 62 6f 76 65 29 2e 0d 20 |uctor (a|bove).. |
|000034f0| 2a 2f 0d 50 6c 75 67 69 | 6e 3a 3a 7e 50 6c 75 67 |*/.Plugi|n::~Plug|
|00003500| 69 6e 28 29 0d 09 7b 0d | 09 7d 20 2f 2f 20 7e 50 |in()..{.|.} // ~P|
|00003510| 6c 75 67 69 6e 0d 0d 0d | 2f 2a 20 54 68 69 73 20 |lugin...|/* This |
|00003520| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 63 61 6c 6c |function| is call|
|00003530| 65 64 20 77 68 65 6e 65 | 76 65 72 20 74 68 65 20 |ed whene|ver the |
|00003540| 75 73 65 72 20 63 6c 69 | 63 6b 73 20 69 6e 20 61 |user cli|cks in a|
|00003550| 6e 20 22 69 6e 74 65 72 | 65 73 74 69 6e 67 20 70 |n "inter|esting p|
|00003560| 6c 61 63 65 22 0d 20 2a | 20 69 6e 20 61 20 64 6f |lace". *| in a do|
|00003570| 63 75 6d 65 6e 74 20 77 | 69 6e 64 6f 77 2e 20 20 |cument w|indow. |
|00003580| 49 74 20 73 68 6f 75 6c | 64 20 72 65 74 75 72 6e |It shoul|d return|
|00003590| 20 74 72 75 65 20 69 66 | 20 77 65 20 68 61 6e 64 | true if| we hand|
|000035a0| 6c 65 20 74 68 65 20 63 | 6c 69 63 6b 2c 20 66 61 |le the c|lick, fa|
|000035b0| 6c 73 65 0d 20 2a 20 28 | 74 68 65 20 6e 6f 72 6d |lse. * (|the norm|
|000035c0| 61 6c 20 63 61 73 65 29 | 20 77 68 65 6e 20 74 68 |al case)| when th|
|000035d0| 65 20 63 6c 69 63 6b 20 | 73 68 6f 75 6c 64 20 62 |e click |should b|
|000035e0| 65 20 70 61 73 73 65 64 | 20 61 6c 6f 6e 67 20 74 |e passed| along t|
|000035f0| 6f 20 6f 74 68 65 72 20 | 70 6c 75 67 2d 69 6e 73 |o other |plug-ins|
|00003600| 0d 20 2a 20 6f 72 20 74 | 6f 20 41 72 72 61 6e 67 |. * or t|o Arrang|
|00003610| 65 27 73 20 6e 6f 72 6d | 61 6c 20 65 76 65 6e 74 |e's norm|al event|
|00003620| 20 70 72 6f 63 65 73 73 | 69 6e 67 2e 20 20 53 65 | process|ing. Se|
|00003630| 65 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 61 74 |e the do|cumentat|
|00003640| 69 6f 6e 20 66 6f 72 0d | 20 2a 20 53 65 74 43 6c |ion for.| * SetCl|
|00003650| 69 63 6b 48 6f 6f 6b 20 | 66 6f 72 20 6d 6f 72 65 |ickHook |for more|
|00003660| 20 64 65 74 61 69 6c 73 | 2e 0d 20 2a 2f 0d 61 72 | details|.. */.ar|
|00003670| 48 6f 6f 6b 52 65 73 75 | 6c 74 20 50 6c 75 67 69 |HookResu|lt Plugi|
|00003680| 6e 3a 3a 43 6c 69 63 6b | 4e 6f 74 69 66 79 28 20 |n::Click|Notify( |
|00003690| 61 72 43 6c 69 63 6b 4c | 6f 63 61 74 69 6f 6e 20 |arClickL|ocation |
|000036a0| 2f 2a 6c 6f 63 2a 2f 2c | 20 50 6f 69 6e 74 20 2f |/*loc*/,| Point /|
|000036b0| 2a 77 68 65 72 65 2a 2f | 2c 0d 09 09 09 09 09 09 |*where*/|,.......|
|000036c0| 09 09 09 09 09 20 53 68 | 6f 72 74 20 2f 2a 6d 6f |..... Sh|ort /*mo|
|000036d0| 64 69 66 69 65 72 73 2a | 2f 2c 20 53 68 6f 72 74 |difiers*|/, Short|
|000036e0| 20 2f 2a 63 6c 69 63 6b | 43 6f 75 6e 74 2a 2f 2c | /*click|Count*/,|
|000036f0| 0d 09 09 09 09 09 09 09 | 09 09 09 09 20 61 72 4e |........|.... arN|
|00003700| 6f 74 65 49 44 20 2f 2a | 6e 6f 74 65 2a 2f 2c 20 |oteID /*|note*/, |
|00003710| 61 72 46 69 65 6c 64 49 | 44 20 2f 2a 66 69 65 6c |arFieldI|D /*fiel|
|00003720| 64 2a 2f 2c 0d 09 09 09 | 09 09 09 09 09 09 09 09 |d*/,....|........|
|00003730| 20 61 72 50 61 74 68 49 | 44 20 2f 2a 70 61 74 68 | arPathI|D /*path|
|00003740| 2a 2f 20 29 0d 09 7b 0d | 09 72 65 74 75 72 6e 20 |*/ )..{.|.return |
|00003750| 66 61 6c 73 65 3b 20 2f | 2f 20 4c 65 74 20 41 72 |false; /|/ Let Ar|
|00003760| 72 61 6e 67 65 20 68 61 | 6e 64 6c 65 20 74 68 65 |range ha|ndle the|
|00003770| 20 65 76 65 6e 74 0d 09 | 7d 20 2f 2f 20 43 6c 69 | event..|} // Cli|
|00003780| 63 6b 4e 6f 74 69 66 79 | 0d 0d 0d 2f 2a 20 54 68 |ckNotify|.../* Th|
|00003790| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 69 73 20 63 |is funct|ion is c|
|000037a0| 61 6c 6c 65 64 20 77 68 | 65 6e 65 76 65 72 20 74 |alled wh|enever t|
|000037b0| 68 65 20 75 73 65 72 20 | 74 79 70 65 73 20 61 20 |he user |types a |
|000037c0| 6b 65 79 20 77 68 69 63 | 68 20 6d 61 74 63 68 65 |key whic|h matche|
|000037d0| 73 20 74 68 65 0d 20 2a | 20 66 69 6c 74 65 72 73 |s the. *| filters|
|000037e0| 20 77 65 20 70 61 73 73 | 20 74 6f 20 53 65 74 4b | we pass| to SetK|
|000037f0| 65 79 48 6f 6f 6b 20 69 | 6e 20 50 6c 75 67 69 6e |eyHook i|n Plugin|
|00003800| 27 73 20 63 6f 6e 73 74 | 72 75 63 74 6f 72 2e 20 |'s const|ructor. |
|00003810| 20 49 74 20 73 68 6f 75 | 6c 64 20 72 65 74 75 72 | It shou|ld retur|
|00003820| 6e 0d 20 2a 20 74 72 75 | 65 20 69 66 20 77 65 20 |n. * tru|e if we |
|00003830| 68 61 6e 64 6c 65 20 74 | 68 65 20 65 76 65 6e 74 |handle t|he event|
|00003840| 2c 20 66 61 6c 73 65 20 | 28 74 68 65 20 6e 6f 72 |, false |(the nor|
|00003850| 6d 61 6c 20 63 61 73 65 | 29 20 77 68 65 6e 20 74 |mal case|) when t|
|00003860| 68 65 20 65 76 65 6e 74 | 0d 20 2a 20 73 68 6f 75 |he event|. * shou|
|00003870| 6c 64 20 62 65 20 70 61 | 73 73 65 64 20 61 6c 6f |ld be pa|ssed alo|
|00003880| 6e 67 20 74 6f 20 6f 74 | 68 65 72 20 70 6c 75 67 |ng to ot|her plug|
|00003890| 2d 69 6e 73 20 6f 72 20 | 74 6f 20 41 72 72 61 6e |-ins or |to Arran|
|000038a0| 67 65 27 73 20 6e 6f 72 | 6d 61 6c 20 65 76 65 6e |ge's nor|mal even|
|000038b0| 74 0d 20 2a 20 70 72 6f | 63 65 73 73 69 6e 67 2e |t. * pro|cessing.|
|000038c0| 20 20 53 65 65 20 74 68 | 65 20 64 6f 63 75 6d 65 | See th|e docume|
|000038d0| 6e 74 61 74 69 6f 6e 20 | 66 6f 72 20 53 65 74 4b |ntation |for SetK|
|000038e0| 65 79 48 6f 6f 6b 20 66 | 6f 72 20 6d 6f 72 65 20 |eyHook f|or more |
|000038f0| 64 65 74 61 69 6c 73 2e | 0d 20 2a 2f 0d 61 72 48 |details.|. */.arH|
|00003900| 6f 6f 6b 52 65 73 75 6c | 74 20 50 6c 75 67 69 6e |ookResul|t Plugin|
|00003910| 3a 3a 4b 65 79 4e 6f 74 | 69 66 79 28 20 53 68 6f |::KeyNot|ify( Sho|
|00003920| 72 74 20 2f 2a 74 68 65 | 43 68 61 72 2a 2f 2c 20 |rt /*the|Char*/, |
|00003930| 53 68 6f 72 74 20 2f 2a | 6b 65 79 2a 2f 2c 0d 09 |Short /*|key*/,..|
|00003940| 09 09 09 09 09 09 09 09 | 09 20 20 53 68 6f 72 74 |........|. Short|
|00003950| 20 2f 2a 6d 6f 64 69 66 | 69 65 72 73 2a 2f 20 29 | /*modif|iers*/ )|
|00003960| 0d 09 7b 0d 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |..{..ret|urn fals|
|00003970| 65 3b 20 2f 2f 20 4c 65 | 74 20 41 72 72 61 6e 67 |e; // Le|t Arrang|
|00003980| 65 20 68 61 6e 64 6c 65 | 20 74 68 65 20 65 76 65 |e handle| the eve|
|00003990| 6e 74 0d 09 7d 20 2f 2f | 20 4b 65 79 4e 6f 74 69 |nt..} //| KeyNoti|
|000039a0| 66 79 0d 0d 0d 2f 2a 20 | 54 68 69 73 20 66 75 6e |fy.../* |This fun|
|000039b0| 63 74 69 6f 6e 20 69 73 | 20 63 61 6c 6c 65 64 20 |ction is| called |
|000039c0| 77 68 65 6e 65 76 65 72 | 20 74 68 65 20 75 73 65 |whenever| the use|
|000039d0| 72 20 63 68 6f 6f 73 65 | 73 20 61 20 6d 65 6e 75 |r choose|s a menu|
|000039e0| 20 69 74 65 6d 20 66 6f | 72 20 77 68 69 63 68 0d | item fo|r which.|
|000039f0| 20 2a 20 77 65 20 68 61 | 76 65 20 72 65 67 69 73 | * we ha|ve regis|
|00003a00| 74 65 72 65 64 20 28 76 | 69 61 20 74 68 65 20 53 |tered (v|ia the S|
|00003a10| 65 74 4d 65 6e 75 48 6f | 6f 6b 20 66 75 6e 63 74 |etMenuHo|ok funct|
|00003a20| 69 6f 6e 29 2e 20 20 49 | 74 20 73 68 6f 75 6c 64 |ion). I|t should|
|00003a30| 20 72 65 74 75 72 6e 20 | 74 72 75 65 0d 20 2a 20 | return |true. * |
|00003a40| 69 66 20 77 65 20 68 61 | 6e 64 6c 65 20 74 68 65 |if we ha|ndle the|
|00003a50| 20 63 6f 6d 6d 61 6e 64 | 2c 20 66 61 6c 73 65 20 | command|, false |
|00003a60| 28 74 68 65 20 6e 6f 72 | 6d 61 6c 20 63 61 73 65 |(the nor|mal case|
|00003a70| 29 20 77 68 65 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |) when t|he comma|
|00003a80| 6e 64 20 73 68 6f 75 6c | 64 0d 20 2a 20 62 65 20 |nd shoul|d. * be |
|00003a90| 70 61 73 73 65 64 20 61 | 6c 6f 6e 67 20 74 6f 20 |passed a|long to |
|00003aa0| 6f 74 68 65 72 20 70 6c | 75 67 2d 69 6e 73 20 6f |other pl|ug-ins o|
|00003ab0| 72 20 74 6f 20 41 72 72 | 61 6e 67 65 27 73 20 6e |r to Arr|ange's n|
|00003ac0| 6f 72 6d 61 6c 20 65 76 | 65 6e 74 20 70 72 6f 63 |ormal ev|ent proc|
|00003ad0| 65 73 73 69 6e 67 2e 0d | 20 2a 20 53 65 65 20 74 |essing..| * See t|
|00003ae0| 68 65 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |he docum|entation|
|00003af0| 20 66 6f 72 20 53 65 74 | 4d 65 6e 75 48 6f 6f 6b | for Set|MenuHook|
|00003b00| 20 66 6f 72 20 6d 6f 72 | 65 20 64 65 74 61 69 6c | for mor|e detail|
|00003b10| 73 2e 0d 20 2a 2f 0d 61 | 72 48 6f 6f 6b 52 65 73 |s.. */.a|rHookRes|
|00003b20| 75 6c 74 20 50 6c 75 67 | 69 6e 3a 3a 4d 65 6e 75 |ult Plug|in::Menu|
|00003b30| 4e 6f 74 69 66 79 28 20 | 49 6e 74 65 67 65 72 20 |Notify( |Integer |
|00003b40| 63 6f 6d 6d 61 6e 64 43 | 6f 64 65 2c 20 49 6e 74 |commandC|ode, Int|
|00003b50| 65 67 65 72 20 2f 2a 63 | 6f 6d 6d 61 6e 64 50 61 |eger /*c|ommandPa|
|00003b60| 72 61 6d 2a 2f 2c 0d 09 | 09 09 09 09 09 09 09 09 |ram*/,..|........|
|00003b70| 09 09 53 68 6f 72 74 20 | 2f 2a 6d 6f 64 69 66 69 |..Short |/*modifi|
|00003b80| 65 72 73 2a 2f 20 29 0d | 09 7b 0d 09 2f 2a 20 49 |ers*/ ).|.{../* I|
|00003b90| 66 20 74 68 69 73 20 69 | 73 20 6f 75 72 20 41 62 |f this i|s our Ab|
|00003ba0| 6f 75 74 20 6d 65 6e 75 | 20 69 74 65 6d 2c 20 64 |out menu| item, d|
|00003bb0| 69 73 70 6c 61 79 20 6f | 75 72 20 61 62 6f 75 74 |isplay o|ur about|
|00003bc0| 2d 62 6f 78 20 64 69 61 | 6c 6f 67 20 61 6e 64 20 |-box dia|log and |
|00003bd0| 72 65 74 75 72 6e 0d 09 | 20 2a 20 74 72 75 65 20 |return..| * true |
|00003be0| 74 6f 20 69 6e 64 69 63 | 61 74 65 20 77 65 20 68 |to indic|ate we h|
|00003bf0| 61 6e 64 6c 65 64 20 74 | 68 65 20 63 6f 6d 6d 61 |andled t|he comma|
|00003c00| 6e 64 2e 0d 09 20 2a 2f | 0d 09 69 66 20 28 63 6f |nd... */|..if (co|
|00003c10| 6d 6d 61 6e 64 43 6f 64 | 65 20 3d 3d 20 61 62 6f |mmandCod|e == abo|
|00003c20| 75 74 43 6d 64 43 6f 64 | 65 29 0d 09 09 7b 0d 09 |utCmdCod|e)...{..|
|00003c30| 09 41 6c 65 72 74 28 4d | 6f 64 75 6c 65 52 73 72 |.Alert(M|oduleRsr|
|00003c40| 63 49 44 2c 20 6e 69 6c | 29 3b 0d 09 09 72 65 74 |cID, nil|);...ret|
|00003c50| 75 72 6e 20 74 72 75 65 | 3b 0d 09 09 7d 0d 09 65 |urn true|;...}..e|
|00003c60| 6c 73 65 0d 09 09 72 65 | 74 75 72 6e 20 66 61 6c |lse...re|turn fal|
|00003c70| 73 65 3b 20 2f 2f 20 4c | 65 74 20 41 72 72 61 6e |se; // L|et Arran|
|00003c80| 67 65 20 68 61 6e 64 6c | 65 20 74 68 65 20 65 76 |ge handl|e the ev|
|00003c90| 65 6e 74 0d 09 0d 09 7d | 20 2f 2f 20 4d 65 6e 75 |ent....}| // Menu|
|00003ca0| 4e 6f 74 69 66 79 0d 0d | 0d 2f 2a 20 49 66 20 77 |Notify..|./* If w|
|00003cb0| 65 20 72 65 67 69 73 74 | 65 72 20 74 6f 20 72 65 |e regist|er to re|
|00003cc0| 63 69 65 76 65 20 65 76 | 65 6e 74 73 20 66 6f 72 |cieve ev|ents for|
|00003cd0| 20 61 20 66 69 65 6c 64 | 20 62 79 20 63 61 6c 6c | a field| by call|
|00003ce0| 69 6e 67 20 53 65 74 46 | 69 65 6c 64 48 6f 6f 6b |ing SetF|ieldHook|
|00003cf0| 2c 20 74 68 69 73 0d 20 | 2a 20 66 75 6e 63 74 69 |, this. |* functi|
|00003d00| 6f 6e 20 77 69 6c 6c 20 | 62 65 20 63 61 6c 6c 65 |on will |be calle|
|00003d10| 64 20 66 6f 72 20 61 6e | 79 20 65 76 65 6e 74 73 |d for an|y events|
|00003d20| 20 69 6e 20 74 68 61 74 | 20 66 69 65 6c 64 2e 20 | in that| field. |
|00003d30| 20 49 74 20 73 68 6f 75 | 6c 64 20 72 65 74 75 72 | It shou|ld retur|
|00003d40| 6e 0d 20 2a 20 66 61 6c | 73 65 20 69 6e 20 61 6c |n. * fal|se in al|
|00003d50| 6d 6f 73 74 20 61 6c 6c | 20 63 61 73 65 73 2e 20 |most all| cases. |
|00003d60| 20 53 65 65 20 74 68 65 | 20 64 6f 63 75 6d 65 6e | See the| documen|
|00003d70| 74 61 74 69 6f 6e 20 66 | 6f 72 20 53 65 74 46 69 |tation f|or SetFi|
|00003d80| 65 6c 64 48 6f 6f 6b 20 | 66 6f 72 0d 20 2a 20 6d |eldHook |for. * m|
|00003d90| 6f 72 65 20 64 65 74 61 | 69 6c 73 2e 0d 20 2a 2f |ore deta|ils.. */|
|00003da0| 0d 61 72 48 6f 6f 6b 52 | 65 73 75 6c 74 20 50 6c |.arHookR|esult Pl|
|00003db0| 75 67 69 6e 3a 3a 46 69 | 65 6c 64 4e 6f 74 69 66 |ugin::Fi|eldNotif|
|00003dc0| 79 28 20 61 72 4e 6f 74 | 65 49 44 20 2f 2a 6e 6f |y( arNot|eID /*no|
|00003dd0| 74 65 2a 2f 2c 20 61 72 | 46 69 65 6c 64 49 44 20 |te*/, ar|FieldID |
|00003de0| 2f 2a 66 69 65 6c 64 2a | 2f 2c 0d 09 09 09 09 09 |/*field*|/,......|
|00003df0| 09 09 09 09 09 09 20 61 | 72 46 69 65 6c 64 41 63 |...... a|rFieldAc|
|00003e00| 74 69 6f 6e 20 2f 2a 61 | 63 74 69 6f 6e 2a 2f 2c |tion /*a|ction*/,|
|00003e10| 0d 09 09 09 09 09 09 09 | 09 09 09 09 20 63 6f 6e |........|.... con|
|00003e20| 73 74 20 63 68 61 72 2a | 20 2f 2a 63 68 6f 69 63 |st char*| /*choic|
|00003e30| 65 54 65 78 74 2a 2f 20 | 29 0d 09 7b 0d 09 72 65 |eText*/ |)..{..re|
|00003e40| 74 75 72 6e 20 66 61 6c | 73 65 3b 0d 09 7d 20 2f |turn fal|se;..} /|
|00003e50| 2f 20 46 69 65 6c 64 4e | 6f 74 69 66 79 0d 0d 0d |/ FieldN|otify...|
|00003e60| 2f 2a 20 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |/* This |function|
|00003e70| 20 69 73 20 63 61 6c 6c | 65 64 20 77 68 65 6e 65 | is call|ed whene|
|00003e80| 76 65 72 20 74 68 65 20 | 75 73 65 72 20 73 77 69 |ver the |user swi|
|00003e90| 74 63 68 65 73 20 77 69 | 6e 64 6f 77 73 20 6f 72 |tches wi|ndows or|
|00003ea0| 20 63 68 61 6e 67 65 73 | 0d 20 2a 20 74 68 65 20 | changes|. * the |
|00003eb0| 63 75 72 72 65 6e 74 20 | 66 6f 6c 64 65 72 2f 74 |current |folder/t|
|00003ec0| 6f 70 69 63 2f 76 69 65 | 77 20 69 6e 20 74 68 65 |opic/vie|w in the|
|00003ed0| 20 66 72 6f 6e 74 20 77 | 69 6e 64 6f 77 2e 20 20 | front w|indow. |
|00003ee0| 53 65 65 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |See the |document|
|00003ef0| 61 74 69 6f 6e 0d 20 2a | 20 66 6f 72 20 53 65 74 |ation. *| for Set|
|00003f00| 54 6f 70 69 63 48 6f 6f | 6b 20 66 6f 72 20 6d 6f |TopicHoo|k for mo|
|00003f10| 72 65 20 64 65 74 61 69 | 6c 73 2e 0d 20 2a 2f 0d |re detai|ls.. */.|
|00003f20| 76 6f 69 64 20 50 6c 75 | 67 69 6e 3a 3a 54 6f 70 |void Plu|gin::Top|
|00003f30| 69 63 4e 6f 74 69 66 79 | 28 20 61 72 54 6f 70 69 |icNotify|( arTopi|
|00003f40| 63 49 44 20 2f 2a 6e 65 | 77 54 6f 70 69 63 2a 2f |cID /*ne|wTopic*/|
|00003f50| 2c 20 61 72 57 69 6e 64 | 6f 77 49 44 20 2f 2a 6e |, arWind|owID /*n|
|00003f60| 65 77 57 69 6e 64 6f 77 | 2a 2f 2c 0d 09 09 09 09 |ewWindow|*/,.....|
|00003f70| 09 09 09 09 20 20 61 72 | 54 6f 70 69 63 41 63 74 |.... ar|TopicAct|
|00003f80| 69 6f 6e 20 2f 2a 61 63 | 74 69 6f 6e 2a 2f 20 29 |ion /*ac|tion*/ )|
|00003f90| 0d 09 7b 0d 09 7d 20 2f | 2f 20 54 6f 70 69 63 4e |..{..} /|/ TopicN|
|00003fa0| 6f 74 69 66 79 0d 0d 0d | 2f 2a 20 54 68 69 73 20 |otify...|/* This |
|00003fb0| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 63 61 6c 6c |function| is call|
|00003fc0| 65 64 20 70 65 72 69 6f | 64 69 63 61 6c 6c 79 2c |ed perio|dically,|
|00003fd0| 20 77 68 65 6e 65 76 65 | 72 20 41 72 72 61 6e 67 | wheneve|r Arrang|
|00003fe0| 65 20 72 65 63 69 65 76 | 65 73 20 61 20 6e 75 6c |e reciev|es a nul|
|00003ff0| 6c 0d 20 2a 20 65 76 65 | 6e 74 20 66 72 6f 6d 20 |l. * eve|nt from |
|00004000| 74 68 65 20 45 76 65 6e | 74 20 4d 61 6e 61 67 65 |the Even|t Manage|
|00004010| 72 2e 0d 20 2a 2f 0d 76 | 6f 69 64 20 50 6c 75 67 |r.. */.v|oid Plug|
|00004020| 69 6e 3a 3a 54 69 63 6b | 4e 6f 74 69 66 79 28 29 |in::Tick|Notify()|
|00004030| 0d 09 7b 0d 09 7d 20 2f | 2f 20 54 69 63 6b 4e 6f |..{..} /|/ TickNo|
|00004040| 74 69 66 79 0d 0d 0d 2f | 2a 20 54 68 69 73 20 66 |tify.../|* This f|
|00004050| 75 6e 63 74 69 6f 6e 20 | 69 73 20 63 61 6c 6c 65 |unction |is calle|
|00004060| 64 20 77 68 65 6e 65 76 | 65 72 20 76 61 72 69 6f |d whenev|er vario|
|00004070| 75 73 20 66 69 6c 65 2d | 6c 65 76 65 6c 20 65 76 |us file-|level ev|
|00004080| 65 6e 74 73 20 6f 63 63 | 75 72 2e 20 20 49 74 0d |ents occ|ur. It.|
|00004090| 20 2a 20 73 68 6f 75 6c | 64 20 72 65 74 75 72 6e | * shoul|d return|
|000040a0| 20 74 72 75 65 20 69 6e | 20 61 6c 6d 6f 73 74 20 | true in| almost |
|000040b0| 61 6c 6c 20 63 61 73 65 | 73 2e 20 20 53 65 65 20 |all case|s. See |
|000040c0| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the docu|mentatio|
|000040d0| 6e 20 66 6f 72 0d 20 2a | 20 53 65 74 46 69 6c 65 |n for. *| SetFile|
|000040e0| 48 6f 6f 6b 20 66 6f 72 | 20 6d 6f 72 65 20 64 65 |Hook for| more de|
|000040f0| 74 61 69 6c 73 2e 0d 20 | 2a 2f 0d 61 72 48 6f 6f |tails.. |*/.arHoo|
|00004100| 6b 52 65 73 75 6c 74 20 | 50 6c 75 67 69 6e 3a 3a |kResult |Plugin::|
|00004110| 46 69 6c 65 4e 6f 74 69 | 66 79 28 61 72 46 69 6c |FileNoti|fy(arFil|
|00004120| 65 41 63 74 69 6f 6e 20 | 2f 2a 61 63 74 69 6f 6e |eAction |/*action|
|00004130| 2a 2f 29 0d 09 7b 0d 09 | 72 65 74 75 72 6e 20 74 |*/)..{..|return t|
|00004140| 72 75 65 3b 0d 09 7d 20 | 2f 2f 20 46 69 6c 65 4e |rue;..} |// FileN|
|00004150| 6f 74 69 66 79 0d 0d 0d | 2f 2a 20 54 68 69 73 20 |otify...|/* This |
|00004160| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 63 61 6c 6c |function| is call|
|00004170| 65 64 20 69 66 20 74 68 | 65 20 75 73 65 72 20 76 |ed if th|e user v|
|00004180| 6f 6c 75 6e 74 61 72 69 | 6c 79 20 71 75 69 74 73 |oluntari|ly quits|
|00004190| 20 41 72 72 61 6e 67 65 | 2e 20 20 49 74 20 73 68 | Arrange|. It sh|
|000041a0| 6f 75 6c 64 0d 20 2a 20 | 72 65 74 75 72 6e 20 74 |ould. * |return t|
|000041b0| 72 75 65 20 74 6f 20 61 | 6c 6c 6f 77 20 74 68 65 |rue to a|llow the|
|000041c0| 20 75 73 65 72 20 74 6f | 20 71 75 69 74 2c 20 66 | user to| quit, f|
|000041d0| 61 6c 73 65 20 74 6f 20 | 70 72 65 76 65 6e 74 20 |alse to |prevent |
|000041e0| 69 74 2e 20 20 53 65 65 | 20 74 68 65 0d 20 2a 20 |it. See| the. * |
|000041f0| 64 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 20 66 6f |document|ation fo|
|00004200| 72 20 53 65 74 51 75 69 | 74 48 6f 6f 6b 20 66 6f |r SetQui|tHook fo|
|00004210| 72 20 6d 6f 72 65 20 64 | 65 74 61 69 6c 73 2e 0d |r more d|etails..|
|00004220| 20 2a 2f 0d 61 72 48 6f | 6f 6b 52 65 73 75 6c 74 | */.arHo|okResult|
|00004230| 20 50 6c 75 67 69 6e 3a | 3a 51 75 69 74 4e 6f 74 | Plugin:|:QuitNot|
|00004240| 69 66 79 28 29 0d 09 7b | 0d 09 72 65 74 75 72 6e |ify()..{|..return|
|00004250| 20 74 72 75 65 3b 0d 09 | 7d 20 2f 2f 20 51 75 69 | true;..|} // Qui|
|00004260| 74 4e 6f 74 69 66 79 0d | 0d 0d 2f 2a 20 54 68 69 |tNotify.|../* Thi|
|00004270| 73 20 66 75 6e 63 74 69 | 6f 6e 20 69 73 20 63 61 |s functi|on is ca|
|00004280| 6c 6c 65 64 20 77 68 65 | 6e 65 76 65 72 20 74 68 |lled whe|never th|
|00004290| 65 20 75 73 65 72 20 63 | 6c 69 63 6b 73 20 69 6e |e user c|licks in|
|000042a0| 20 74 68 65 20 6d 65 6e | 75 20 62 61 72 20 6f 72 | the men|u bar or|
|000042b0| 20 74 79 70 65 73 0d 20 | 2a 20 61 20 63 6f 6d 6d | types. |* a comm|
|000042c0| 61 6e 64 20 6b 65 79 2c | 20 6a 75 73 74 20 62 65 |and key,| just be|
|000042d0| 66 6f 72 65 20 70 72 6f | 63 65 73 73 69 6e 67 20 |fore pro|cessing |
|000042e0| 74 68 65 20 65 76 65 6e | 74 2e 20 20 49 74 20 73 |the even|t. It s|
|000042f0| 68 6f 75 6c 64 20 64 6f | 20 61 6e 79 20 66 69 78 |hould do| any fix|
|00004300| 69 6e 67 0d 20 2a 20 75 | 70 20 6f 66 20 6d 65 6e |ing. * u|p of men|
|00004310| 75 73 20 77 68 69 63 68 | 20 6d 69 67 68 74 20 62 |us which| might b|
|00004320| 65 20 6e 65 63 65 73 73 | 61 72 79 20 62 61 73 65 |e necess|ary base|
|00004330| 64 20 6f 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |d on the| current|
|00004340| 20 73 74 61 74 65 20 6f | 66 20 61 66 66 61 69 72 | state o|f affair|
|00004350| 73 2e 0d 20 2a 20 53 65 | 65 20 74 68 65 20 64 6f |s.. * Se|e the do|
|00004360| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 66 6f 72 20 |cumentat|ion for |
|00004370| 53 65 74 41 54 4d 48 6f | 6f 6b 20 66 6f 72 20 6d |SetATMHo|ok for m|
|00004380| 6f 72 65 20 64 65 74 61 | 69 6c 73 2e 0d 20 2a 2f |ore deta|ils.. */|
|00004390| 0d 76 6f 69 64 20 50 6c | 75 67 69 6e 3a 3a 41 54 |.void Pl|ugin::AT|
|000043a0| 4d 4e 6f 74 69 66 79 28 | 29 0d 09 7b 0d 09 7d 20 |MNotify(|)..{..} |
|000043b0| 2f 2f 20 41 54 4d 4e 6f | 74 69 66 79 0d 0d 0d 2f |// ATMNo|tify.../|
|000043c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004400| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0d 2f 2a 2a 2a 2a |********|*/./****|
|00004410| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004420| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 20 49 6d |********|***** Im|
|00004430| 70 6f 72 74 20 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |port ***|********|
|00004440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004450| 2a 2a 2a 2a 2a 2f 0d 2f | 2a 2a 2a 2a 2a 2a 2a 2a |*****/./|********|
|00004460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004480| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004490| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000044a0| 2a 2f 0d 0d 2f 2a 20 52 | 65 61 64 20 74 6f 20 74 |*/../* R|ead to t|
|000044b0| 68 65 20 6e 65 78 74 20 | 74 61 62 20 6f 72 20 43 |he next |tab or C|
|000044c0| 52 2e 20 4c 6f 61 64 20 | 74 68 65 20 64 61 74 61 |R. Load |the data|
|000044d0| 2c 20 6d 69 6e 75 73 20 | 0d 20 2a 20 64 65 6c 69 |, minus |. * deli|
|000044e0| 6d 69 74 65 72 2c 20 69 | 6e 74 6f 20 74 68 65 20 |miter, i|nto the |
|000044f0| 62 75 66 66 65 72 2c 20 | 61 6e 64 20 72 65 74 75 |buffer, |and retu|
|00004500| 72 6e 20 74 68 65 20 6c | 65 6e 67 74 68 20 72 65 |rn the l|ength re|
|00004510| 61 64 20 28 6d 69 6e 75 | 73 20 74 68 65 20 64 65 |ad (minu|s the de|
|00004520| 6c 69 6d 69 74 65 72 29 | 2e 20 0d 20 2a 20 53 69 |limiter)|. . * Si|
|00004530| 67 6e 61 6c 20 74 72 75 | 65 20 69 66 20 74 68 65 |gnal tru|e if the|
|00004540| 20 64 65 6c 69 6d 69 74 | 65 72 20 77 61 73 20 74 | delimit|er was t|
|00004550| 68 65 20 74 61 62 20 63 | 68 61 72 2e 20 45 4f 46 |he tab c|har. EOF|
|00004560| 20 63 6f 75 6e 74 73 20 | 61 73 20 43 52 2e 20 54 | counts |as CR. T|
|00004570| 68 65 20 62 75 66 66 65 | 72 20 6d 75 73 74 0d 20 |he buffe|r must. |
|00004580| 2a 20 62 65 20 61 74 20 | 6c 65 61 73 74 20 34 4b |* be at |least 4K|
|00004590| 20 6c 6f 6e 67 2e 20 4e | 6f 74 65 20 74 68 61 74 | long. N|ote that|
|000045a0| 20 74 68 69 73 20 77 69 | 6c 6c 20 72 65 61 64 20 | this wi|ll read |
|000045b0| 74 68 65 20 64 65 6c 69 | 6d 69 74 65 72 20 63 68 |the deli|miter ch|
|000045c0| 61 72 61 63 74 65 72 2c | 20 61 6c 74 68 6f 75 67 |aracter,| althoug|
|000045d0| 68 20 0d 20 2a 20 69 74 | 20 77 69 6c 6c 20 6e 6f |h . * it| will no|
|000045e0| 74 20 72 65 74 75 72 6e | 20 69 74 20 69 6e 20 74 |t return| it in t|
|000045f0| 68 65 20 62 75 66 66 65 | 72 2e 20 53 6f 2c 20 72 |he buffe|r. So, r|
|00004600| 65 70 65 61 74 65 64 20 | 63 61 6c 6c 73 20 74 6f |epeated |calls to|
|00004610| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 77 69 | this ro|utine wi|
|00004620| 6c 6c 20 0d 20 2a 20 72 | 65 74 75 72 6e 20 61 6c |ll . * r|eturn al|
|00004630| 6c 20 74 68 65 20 64 61 | 74 61 20 69 6e 62 65 74 |l the da|ta inbet|
|00004640| 77 65 65 6e 20 74 68 65 | 20 64 65 6c 69 6d 69 74 |ween the| delimit|
|00004650| 65 72 73 20 69 6e 20 74 | 68 65 20 73 74 72 65 61 |ers in t|he strea|
|00004660| 6d 2c 20 62 75 74 20 6e | 6f 6e 65 20 6f 66 20 74 |m, but n|one of t|
|00004670| 68 65 20 0d 20 2a 20 64 | 65 6c 69 6d 69 74 65 72 |he . * d|elimiter|
|00004680| 73 3a 20 0d 20 2a 20 0d | 20 2a 20 77 68 69 6c 65 |s: . * .| * while|
|00004690| 20 28 52 65 61 64 54 6f | 4e 65 78 74 44 65 6c 69 | (ReadTo|NextDeli|
|000046a0| 6d 69 74 65 72 28 73 74 | 72 65 61 6d 2c 62 75 66 |miter(st|ream,buf|
|000046b0| 66 65 72 2c 77 61 73 54 | 61 62 29 20 21 3d 20 30 |fer,wasT|ab) != 0|
|000046c0| 29 0d 20 2a 20 20 2e 2e | 2e 20 6e 6f 20 64 65 6c |). * ..|. no del|
|000046d0| 69 6d 69 74 65 72 73 20 | 69 6e 20 74 68 65 20 62 |imiters |in the b|
|000046e0| 75 66 66 65 72 20 2e 2e | 2e 0d 20 2a 0d 20 2a 20 |uffer ..|.. *. * |
|000046f0| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 69 73 20 72 |Note tha|t this r|
|00004700| 6f 75 74 69 6e 65 20 77 | 69 6c 6c 20 61 6c 77 61 |outine w|ill alwa|
|00004710| 79 73 20 72 65 61 64 20 | 75 6e 74 69 6c 20 65 69 |ys read |until ei|
|00004720| 74 68 65 72 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |ther the| end of |
|00004730| 74 68 65 20 66 69 6c 65 | 20 6f 72 20 74 68 65 20 |the file| or the |
|00004740| 0d 20 2a 20 6e 65 78 74 | 20 64 65 6c 69 6d 69 74 |. * next| delimit|
|00004750| 65 72 2c 20 62 75 74 20 | 69 74 20 77 69 6c 6c 20 |er, but |it will |
|00004760| 73 74 6f 72 65 20 6e 6f | 20 6d 6f 72 65 20 74 68 |store no| more th|
|00004770| 61 6e 20 62 75 66 66 65 | 72 4c 65 6e 67 74 68 20 |an buffe|rLength |
|00004780| 69 6e 20 74 68 65 20 62 | 75 66 66 65 72 2e 0d 20 |in the b|uffer.. |
|00004790| 2a 2f 0d 49 6e 74 65 67 | 65 72 20 52 65 61 64 54 |*/.Integ|er ReadT|
|000047a0| 6f 4e 65 78 74 44 65 6c | 69 6d 69 74 65 72 28 20 |oNextDel|imiter( |
|000047b0| 53 69 6d 70 6c 65 53 74 | 72 65 61 6d 20 2a 73 74 |SimpleSt|ream *st|
|000047c0| 72 65 61 6d 2c 20 4f 55 | 54 20 63 68 61 72 20 2a |ream, OU|T char *|
|000047d0| 62 75 66 66 65 72 2c 20 | 0d 09 09 09 09 09 09 09 |buffer, |........|
|000047e0| 09 09 20 20 49 6e 74 65 | 67 65 72 20 62 75 66 66 |.. Inte|ger buff|
|000047f0| 65 72 4c 65 6e 67 74 68 | 2c 20 4f 55 54 20 42 6f |erLength|, OUT Bo|
|00004800| 6f 6c 65 61 6e 20 26 77 | 61 73 54 61 62 20 29 0d |olean &w|asTab ).|
|00004810| 09 7b 0d 09 63 68 61 72 | 20 2a 73 74 61 72 74 42 |.{..char| *startB|
|00004820| 75 66 66 65 72 20 3d 20 | 62 75 66 66 65 72 3b 0d |uffer = |buffer;.|
|00004830| 09 77 68 69 6c 65 20 28 | 73 74 72 65 61 6d 2d 3e |.while (|stream->|
|00004840| 42 79 74 65 73 52 65 6d | 61 69 6e 69 6e 67 28 29 |BytesRem|aining()|
|00004850| 20 3e 20 30 29 0d 09 09 | 7b 0d 09 09 63 68 61 72 | > 0)...|{...char|
|00004860| 20 6e 65 78 74 43 68 61 | 72 20 3d 20 73 74 72 65 | nextCha|r = stre|
|00004870| 61 6d 2d 3e 52 65 61 64 | 42 79 74 65 28 29 3b 0d |am->Read|Byte();.|
|00004880| 09 09 69 66 20 28 6e 65 | 78 74 43 68 61 72 20 3d |..if (ne|xtChar =|
|00004890| 3d 20 27 5c 74 27 29 0d | 09 09 09 7b 0d 09 09 09 |= '\t').|...{....|
|000048a0| 77 61 73 54 61 62 20 3d | 20 74 72 75 65 3b 0d 09 |wasTab =| true;..|
|000048b0| 09 09 72 65 74 75 72 6e | 20 62 75 66 66 65 72 20 |..return| buffer |
|000048c0| 2d 20 73 74 61 72 74 42 | 75 66 66 65 72 3b 0d 09 |- startB|uffer;..|
|000048d0| 09 09 7d 0d 09 09 65 6c | 73 65 20 69 66 20 28 6e |..}...el|se if (n|
|000048e0| 65 78 74 43 68 61 72 20 | 3d 3d 20 27 5c 6e 27 29 |extChar |== '\n')|
|000048f0| 0d 09 09 09 7b 0d 09 09 | 09 77 61 73 54 61 62 20 |....{...|.wasTab |
|00004900| 3d 20 66 61 6c 73 65 3b | 0d 09 09 09 72 65 74 75 |= false;|....retu|
|00004910| 72 6e 20 62 75 66 66 65 | 72 20 2d 20 73 74 61 72 |rn buffe|r - star|
|00004920| 74 42 75 66 66 65 72 3b | 0d 09 09 09 7d 0d 09 09 |tBuffer;|....}...|
|00004930| 0d 09 09 69 66 20 28 62 | 75 66 66 65 72 20 2d 20 |...if (b|uffer - |
|00004940| 73 74 61 72 74 42 75 66 | 66 65 72 20 3c 20 62 75 |startBuf|fer < bu|
|00004950| 66 66 65 72 4c 65 6e 67 | 74 68 29 0d 09 09 09 7b |fferLeng|th)....{|
|00004960| 0d 09 09 09 62 75 66 66 | 65 72 5b 30 5d 20 3d 20 |....buff|er[0] = |
|00004970| 6e 65 78 74 43 68 61 72 | 3b 0d 09 09 09 62 75 66 |nextChar|;....buf|
|00004980| 66 65 72 2b 2b 3b 0d 09 | 09 09 7d 0d 09 09 7d 0d |fer++;..|..}...}.|
|00004990| 09 0d 09 77 61 73 54 61 | 62 20 3d 20 66 61 6c 73 |...wasTa|b = fals|
|000049a0| 65 3b 0d 09 72 65 74 75 | 72 6e 20 62 75 66 66 65 |e;..retu|rn buffe|
|000049b0| 72 20 2d 20 73 74 61 72 | 74 42 75 66 66 65 72 3b |r - star|tBuffer;|
|000049c0| 0d 09 7d 20 2f 2f 20 52 | 65 61 64 54 6f 4e 65 78 |..} // R|eadToNex|
|000049d0| 74 44 65 6c 69 6d 69 74 | 65 72 0d 0d 0d 2f 2a 20 |tDelimit|er.../* |
|000049e0| 4c 6f 6f 6b 75 70 20 74 | 68 65 20 6e 61 6d 65 20 |Lookup t|he name |
|000049f0| 6f 66 20 74 68 65 20 41 | 72 72 61 6e 67 65 20 66 |of the A|rrange f|
|00004a00| 69 65 6c 64 20 74 68 61 | 74 20 63 6f 72 72 65 73 |ield tha|t corres|
|00004a10| 70 6f 6e 64 73 20 74 6f | 20 74 68 65 20 66 69 65 |ponds to| the fie|
|00004a20| 6c 64 20 0d 20 2a 20 69 | 6e 20 74 68 65 20 4d 4d |ld . * i|n the MM|
|00004a30| 20 66 69 6c 65 2e 0d 20 | 2a 2f 0d 73 74 61 74 69 | file.. |*/.stati|
|00004a40| 63 20 76 6f 69 64 20 47 | 65 74 41 72 72 61 6e 67 |c void G|etArrang|
|00004a50| 65 4e 61 6d 65 46 6f 72 | 4d 4d 46 69 65 6c 64 28 |eNameFor|MMField(|
|00004a60| 4d 65 65 74 69 6e 67 4d | 61 6b 65 72 46 69 65 6c |MeetingM|akerFiel|
|00004a70| 64 20 74 68 65 46 69 65 | 6c 64 2c 20 4f 55 54 20 |d theFie|ld, OUT |
|00004a80| 63 68 61 72 20 2a 6e 61 | 6d 65 29 0d 09 7b 0d 09 |char *na|me)..{..|
|00004a90| 6e 61 6d 65 5b 30 5d 20 | 3d 20 30 3b 0d 09 67 65 |name[0] |= 0;..ge|
|00004aa0| 74 69 6e 64 73 74 72 69 | 6e 67 28 26 6e 61 6d 65 |tindstri|ng(&name|
|00004ab0| 5b 30 5d 2c 72 46 69 65 | 6c 64 4e 61 6d 65 53 74 |[0],rFie|ldNameSt|
|00004ac0| 72 69 6e 67 73 2c 74 68 | 65 46 69 65 6c 64 20 2b |rings,th|eField +|
|00004ad0| 20 31 29 3b 20 0d 09 7d | 20 2f 2f 20 47 65 74 41 | 1); ..}| // GetA|
|00004ae0| 72 72 61 6e 67 65 4e 61 | 6d 65 46 6f 72 4d 4d 46 |rrangeNa|meForMMF|
|00004af0| 69 65 6c 64 0d 09 0d 0d | 2f 2a 20 52 65 74 75 72 |ield....|/* Retur|
|00004b00| 6e 20 74 68 65 20 61 72 | 72 61 6e 67 65 20 66 69 |n the ar|range fi|
|00004b10| 65 6c 64 20 66 6f 72 20 | 74 68 65 20 67 69 76 65 |eld for |the give|
|00004b20| 6e 20 6d 65 65 74 69 6e | 67 20 6d 61 6b 65 72 20 |n meetin|g maker |
|00004b30| 66 69 65 6c 64 2c 20 6f | 72 20 6e 69 6c 20 69 66 |field, o|r nil if|
|00004b40| 20 69 74 20 0d 20 2a 20 | 64 6f 65 73 6e 27 74 20 | it . * |doesn't |
|00004b50| 65 78 69 73 74 2e 20 59 | 6f 75 20 73 68 6f 75 6c |exist. Y|ou shoul|
|00004b60| 64 20 63 61 6c 6c 20 41 | 6c 6c 6f 63 61 74 65 46 |d call A|llocateF|
|00004b70| 69 65 6c 64 73 41 6e 64 | 54 79 70 65 73 20 62 65 |ieldsAnd|Types be|
|00004b80| 6c 6f 77 20 62 65 66 6f | 72 65 20 0d 20 2a 20 63 |low befo|re . * c|
|00004b90| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 74 6f 20 6d |alling t|his to m|
|00004ba0| 61 6b 65 20 74 68 65 20 | 66 69 65 6c 64 20 65 78 |ake the |field ex|
|00004bb0| 69 73 74 2e 20 54 68 69 | 73 20 61 63 74 75 61 6c |ist. Thi|s actual|
|00004bc0| 6c 79 20 6c 6f 6f 6b 73 | 20 74 68 65 20 61 72 46 |ly looks| the arF|
|00004bd0| 69 65 6c 64 49 44 20 75 | 70 0d 20 2a 20 69 6e 20 |ieldID u|p. * in |
|00004be0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 64 6f 63 75 |the curr|ent docu|
|00004bf0| 6d 65 6e 74 2e 0d 20 2a | 2f 0d 61 72 46 69 65 6c |ment.. *|/.arFiel|
|00004c00| 64 49 44 20 50 6c 75 67 | 69 6e 3a 3a 47 65 74 41 |dID Plug|in::GetA|
|00004c10| 72 72 61 6e 67 65 46 69 | 65 6c 64 46 6f 72 4d 4d |rrangeFi|eldForMM|
|00004c20| 46 69 65 6c 64 28 4d 65 | 65 74 69 6e 67 4d 61 6b |Field(Me|etingMak|
|00004c30| 65 72 46 69 65 6c 64 20 | 66 69 65 6c 64 29 0d 09 |erField |field)..|
|00004c40| 7b 0d 09 63 68 61 72 20 | 62 75 66 66 65 72 5b 32 |{..char |buffer[2|
|00004c50| 35 36 5d 3b 0d 09 0d 09 | 47 65 74 41 72 72 61 6e |56];....|GetArran|
|00004c60| 67 65 4e 61 6d 65 46 6f | 72 4d 4d 46 69 65 6c 64 |geNameFo|rMMField|
|00004c70| 28 66 69 65 6c 64 2c 62 | 75 66 66 65 72 29 3b 0d |(field,b|uffer);.|
|00004c80| 09 69 66 20 28 62 75 66 | 66 65 72 5b 30 5d 20 21 |.if (buf|fer[0] !|
|00004c90| 3d 20 27 3c 27 29 0d 09 | 09 7b 0d 09 09 2f 2f 4c |= '<')..|.{...//L|
|00004ca0| 6f 6f 6b 75 70 20 74 68 | 65 20 66 69 65 6c 64 0d |ookup th|e field.|
|00004cb0| 09 09 72 65 74 75 72 6e | 20 63 61 6c 6c 73 2d 3e |..return| calls->|
|00004cc0| 73 79 73 4f 62 6a 2d 3e | 4c 6f 6f 6b 75 70 4f 62 |sysObj->|LookupOb|
|00004cd0| 6a 65 63 74 4e 61 6d 65 | 28 61 72 46 69 65 6c 64 |jectName|(arField|
|00004ce0| 2c 62 75 66 66 65 72 2c | 66 61 6c 73 65 29 3b 0d |,buffer,|false);.|
|00004cf0| 09 09 7d 0d 09 09 0d 09 | 72 65 74 75 72 6e 20 30 |..}.....|return 0|
|00004d00| 3b 0d 09 7d 20 2f 2f 20 | 47 65 74 41 72 72 61 6e |;..} // |GetArran|
|00004d10| 67 65 46 69 65 6c 64 46 | 6f 72 4d 4d 46 69 65 6c |geFieldF|orMMFiel|
|00004d20| 64 0d 0d 0d 2f 2f 20 43 | 72 65 61 74 65 20 74 68 |d...// C|reate th|
|00004d30| 65 20 6e 6f 74 65 20 74 | 79 70 65 20 61 6e 64 20 |e note t|ype and |
|00004d40| 66 69 65 6c 64 73 20 66 | 6f 72 20 74 68 65 20 4d |fields f|or the M|
|00004d50| 4d 20 69 6d 70 6f 72 74 | 2c 20 69 66 20 74 68 65 |M import|, if the|
|00004d60| 79 20 64 6f 6e 27 74 20 | 61 6c 72 65 61 64 79 20 |y don't |already |
|00004d70| 65 78 69 73 74 2e 0d 61 | 72 54 79 70 65 49 44 20 |exist..a|rTypeID |
|00004d80| 50 6c 75 67 69 6e 3a 3a | 41 6c 6c 6f 63 61 74 65 |Plugin::|Allocate|
|00004d90| 46 69 65 6c 64 73 41 6e | 64 54 79 70 65 73 28 29 |FieldsAn|dTypes()|
|00004da0| 0d 09 7b 0d 09 63 68 61 | 72 20 62 75 66 66 65 72 |..{..cha|r buffer|
|00004db0| 5b 32 35 36 5d 3b 0d 09 | 0d 09 2f 2f 53 65 65 20 |[256];..|..//See |
|00004dc0| 69 66 20 74 68 65 20 74 | 79 70 65 20 65 78 69 73 |if the t|ype exis|
|00004dd0| 74 73 0d 09 67 65 74 69 | 6e 64 73 74 72 69 6e 67 |ts..geti|ndstring|
|00004de0| 28 26 62 75 66 66 65 72 | 5b 30 5d 2c 72 46 69 65 |(&buffer|[0],rFie|
|00004df0| 6c 64 4e 61 6d 65 53 74 | 72 69 6e 67 73 2c 72 4e |ldNameSt|rings,rN|
|00004e00| 6f 74 65 54 79 70 65 4e | 61 6d 65 29 3b 20 0d 09 |oteTypeN|ame); ..|
|00004e10| 61 72 54 79 70 65 49 44 | 20 74 79 70 65 20 3d 20 |arTypeID| type = |
|00004e20| 63 61 6c 6c 73 2d 3e 73 | 79 73 4f 62 6a 2d 3e 4c |calls->s|ysObj->L|
|00004e30| 6f 6f 6b 75 70 4f 62 6a | 65 63 74 4e 61 6d 65 28 |ookupObj|ectName(|
|00004e40| 61 72 4e 6f 74 65 54 79 | 70 65 2c 62 75 66 66 65 |arNoteTy|pe,buffe|
|00004e50| 72 2c 66 61 6c 73 65 29 | 3b 0d 09 0d 09 69 66 20 |r,false)|;....if |
|00004e60| 28 74 79 70 65 20 3d 3d | 20 30 29 0d 09 09 7b 0d |(type ==| 0)...{.|
|00004e70| 09 09 74 79 70 65 20 3d | 20 63 61 6c 6c 73 2d 3e |..type =| calls->|
|00004e80| 73 79 73 4f 62 6a 2d 3e | 43 72 65 61 74 65 4e 6f |sysObj->|CreateNo|
|00004e90| 74 65 54 79 70 65 28 62 | 75 66 66 65 72 2c 74 72 |teType(b|uffer,tr|
|00004ea0| 75 65 29 3b 0d 09 09 0d | 09 09 2f 2f 52 65 6d 6f |ue);....|..//Remo|
|00004eb0| 76 65 20 74 68 65 20 6e | 6f 74 65 20 74 65 78 74 |ve the n|ote text|
|00004ec0| 20 66 69 65 6c 64 0d 09 | 09 63 61 6c 6c 73 2d 3e | field..|.calls->|
|00004ed0| 6e 6f 74 65 73 2d 3e 52 | 65 6d 6f 76 65 46 69 65 |notes->R|emoveFie|
|00004ee0| 6c 64 28 74 79 70 65 2c | 20 63 61 6c 6c 73 2d 3e |ld(type,| calls->|
|00004ef0| 73 79 73 4f 62 6a 2d 3e | 47 65 74 42 75 69 6c 74 |sysObj->|GetBuilt|
|00004f00| 49 6e 4f 62 6a 65 63 74 | 28 62 6f 4e 6f 74 65 54 |InObject|(boNoteT|
|00004f10| 65 78 74 46 69 65 6c 64 | 29 29 3b 0d 09 09 7d 0d |extField|));...}.|
|00004f20| 09 09 0d 09 66 6f 72 20 | 28 49 6e 74 65 67 65 72 |....for |(Integer|
|00004f30| 20 69 6e 64 65 78 20 3d | 20 6d 6d 54 69 74 6c 65 | index =| mmTitle|
|00004f40| 3b 20 69 6e 64 65 78 20 | 3c 20 6d 6d 4e 6f 74 65 |; index |< mmNote|
|00004f50| 73 20 2b 20 31 3b 20 69 | 6e 64 65 78 2b 2b 29 0d |s + 1; i|ndex++).|
|00004f60| 09 09 7b 0d 09 09 2f 2f | 43 72 65 61 74 65 20 65 |..{...//|Create e|
|00004f70| 61 63 68 20 6f 66 20 74 | 68 65 73 65 20 69 66 20 |ach of t|hese if |
|00004f80| 6e 65 65 64 65 64 2c 20 | 61 6e 64 20 61 64 64 20 |needed, |and add |
|00004f90| 69 74 20 74 6f 20 74 68 | 65 20 74 79 70 65 20 69 |it to th|e type i|
|00004fa0| 66 20 6e 6f 74 20 70 72 | 65 73 65 6e 74 2e 0d 09 |f not pr|esent...|
|00004fb0| 09 47 65 74 41 72 72 61 | 6e 67 65 4e 61 6d 65 46 |.GetArra|ngeNameF|
|00004fc0| 6f 72 4d 4d 46 69 65 6c | 64 28 28 4d 65 65 74 69 |orMMFiel|d((Meeti|
|00004fd0| 6e 67 4d 61 6b 65 72 46 | 69 65 6c 64 29 69 6e 64 |ngMakerF|ield)ind|
|00004fe0| 65 78 2c 62 75 66 66 65 | 72 29 3b 0d 09 09 69 66 |ex,buffe|r);...if|
|00004ff0| 20 28 62 75 66 66 65 72 | 5b 30 5d 20 21 3d 20 27 | (buffer|[0] != '|
|00005000| 3c 27 29 0d 09 09 09 7b | 0d 09 09 09 2f 2f 4c 6f |<')....{|....//Lo|
|00005010| 6f 6b 75 70 20 74 68 65 | 20 66 69 65 6c 64 0d 09 |okup the| field..|
|00005020| 09 09 61 72 46 69 65 6c | 64 49 44 20 66 69 65 6c |..arFiel|dID fiel|
|00005030| 64 20 3d 20 63 61 6c 6c | 73 2d 3e 73 79 73 4f 62 |d = call|s->sysOb|
|00005040| 6a 2d 3e 4c 6f 6f 6b 75 | 70 4f 62 6a 65 63 74 4e |j->Looku|pObjectN|
|00005050| 61 6d 65 28 61 72 46 69 | 65 6c 64 2c 62 75 66 66 |ame(arFi|eld,buff|
|00005060| 65 72 2c 66 61 6c 73 65 | 29 3b 0d 09 09 09 69 66 |er,false|);....if|
|00005070| 20 28 66 69 65 6c 64 20 | 3d 3d 20 30 29 0d 09 09 | (field |== 0)...|
|00005080| 09 09 7b 0d 09 09 09 09 | 61 72 46 69 65 6c 64 54 |..{.....|arFieldT|
|00005090| 79 70 65 20 74 68 65 46 | 69 65 6c 64 54 79 70 65 |ype theF|ieldType|
|000050a0| 20 3d 20 61 72 46 54 54 | 65 78 74 3b 0d 09 09 09 | = arFTT|ext;....|
|000050b0| 09 69 66 20 28 69 6e 64 | 65 78 20 3d 3d 20 6d 6d |.if (ind|ex == mm|
|000050c0| 44 61 74 65 20 7c 7c 20 | 69 6e 64 65 78 20 3d 3d |Date || |index ==|
|000050d0| 20 6d 6d 53 74 61 72 74 | 54 69 6d 65 20 7c 7c 20 | mmStart|Time || |
|000050e0| 69 6e 64 65 78 20 3d 3d | 20 6d 6d 44 75 72 61 74 |index ==| mmDurat|
|000050f0| 69 6f 6e 29 0d 09 09 09 | 09 09 74 68 65 46 69 65 |ion)....|..theFie|
|00005100| 6c 64 54 79 70 65 20 3d | 20 61 72 46 54 44 61 74 |ldType =| arFTDat|
|00005110| 65 54 69 6d 65 3b 0d 0d | 09 09 09 09 66 69 65 6c |eTime;..|....fiel|
|00005120| 64 20 3d 20 63 61 6c 6c | 73 2d 3e 73 79 73 4f 62 |d = call|s->sysOb|
|00005130| 6a 2d 3e 43 72 65 61 74 | 65 46 69 65 6c 64 28 62 |j->Creat|eField(b|
|00005140| 75 66 66 65 72 2c 74 68 | 65 46 69 65 6c 64 54 79 |uffer,th|eFieldTy|
|00005150| 70 65 2c 74 72 75 65 29 | 3b 0d 09 09 09 09 7d 0d |pe,true)|;.....}.|
|00005160| 09 09 09 0d 09 09 09 69 | 66 20 28 21 63 61 6c 6c |.......i|f (!call|
|00005170| 73 2d 3e 6e 6f 74 65 73 | 2d 3e 4e 6f 74 65 48 61 |s->notes|->NoteHa|
|00005180| 73 46 69 65 6c 64 28 74 | 79 70 65 2c 66 69 65 6c |sField(t|ype,fiel|
|00005190| 64 2c 74 72 75 65 29 29 | 0d 09 09 09 09 63 61 6c |d,true))|.....cal|
|000051a0| 6c 73 2d 3e 6e 6f 74 65 | 73 2d 3e 41 64 64 46 69 |ls->note|s->AddFi|
|000051b0| 65 6c 64 28 74 79 70 65 | 2c 66 69 65 6c 64 2c 30 |eld(type|,field,0|
|000051c0| 29 3b 0d 09 09 09 7d 0d | 09 09 7d 0d 09 09 0d 09 |);....}.|..}.....|
|000051d0| 72 65 74 75 72 6e 20 74 | 79 70 65 3b 0d 09 7d 20 |return t|ype;..} |
|000051e0| 2f 2f 20 41 6c 6c 6f 63 | 61 74 65 46 69 65 6c 64 |// Alloc|ateField|
|000051f0| 73 41 6e 64 54 79 70 65 | 73 0d 0d 0d 2f 2a 20 54 |sAndType|s.../* T|
|00005200| 68 69 73 20 61 73 73 75 | 6d 65 73 20 74 68 61 74 |his assu|mes that|
|00005210| 20 74 68 65 20 66 69 6c | 65 20 69 73 20 61 6c 72 | the fil|e is alr|
|00005220| 65 61 64 79 20 6f 70 65 | 6e 20 66 6f 72 20 72 65 |eady ope|n for re|
|00005230| 61 64 2e 20 54 68 69 73 | 20 77 69 6c 6c 20 6e 6f |ad. This| will no|
|00005240| 74 20 63 6c 6f 73 65 20 | 74 68 65 0d 20 2a 20 66 |t close |the. * f|
|00005250| 69 6c 65 2e 20 20 49 6d | 70 6f 72 74 20 74 68 65 |ile. Im|port the|
|00005260| 20 66 69 6c 65 20 75 73 | 69 6e 67 20 74 68 65 20 | file us|ing the |
|00005270| 4d 65 65 74 69 6e 67 20 | 4d 61 6b 65 72 20 66 6f |Meeting |Maker fo|
|00005280| 72 6d 61 74 2e 20 0d 20 | 2a 2f 0d 49 6e 74 65 67 |rmat. . |*/.Integ|
|00005290| 65 72 20 50 6c 75 67 69 | 6e 3a 3a 49 6d 70 6f 72 |er Plugi|n::Impor|
|000052a0| 74 4e 6f 74 69 66 79 28 | 20 53 68 6f 72 74 20 66 |tNotify(| Short f|
|000052b0| 52 65 66 6e 75 6d 2c 20 | 49 6e 74 65 67 65 72 20 |Refnum, |Integer |
|000052c0| 66 6f 72 6d 61 74 49 44 | 2c 0d 09 09 09 09 09 09 |formatID|,.......|
|000052d0| 09 09 09 09 42 6f 6f 6c | 65 61 6e 20 73 6e 69 66 |....Bool|ean snif|
|000052e0| 66 2c 20 61 72 54 6f 70 | 69 63 49 44 20 64 65 73 |f, arTop|icID des|
|000052f0| 74 54 6f 70 69 63 20 29 | 0d 09 7b 0d 09 2f 2f 49 |tTopic )|..{..//I|
|00005300| 73 20 74 68 69 73 20 74 | 68 65 20 72 69 67 68 74 |s this t|he right|
|00005310| 20 66 6f 72 6d 61 74 3f | 0d 09 69 66 20 28 66 6f | format?|..if (fo|
|00005320| 72 6d 61 74 49 44 20 21 | 3d 20 27 4d 4d 6b 72 27 |rmatID !|= 'MMkr'|
|00005330| 29 0d 09 09 72 65 74 75 | 72 6e 20 2d 31 3b 0d 09 |)...retu|rn -1;..|
|00005340| 09 0d 09 61 72 54 6f 70 | 69 63 49 6e 66 6f 20 69 |...arTop|icInfo i|
|00005350| 6e 66 6f 3b 20 0d 09 63 | 61 6c 6c 73 2d 3e 73 79 |nfo; ..c|alls->sy|
|00005360| 73 4f 62 6a 2d 3e 47 65 | 74 54 6f 70 69 63 49 6e |sObj->Ge|tTopicIn|
|00005370| 66 6f 28 64 65 73 74 54 | 6f 70 69 63 2c 26 69 6e |fo(destT|opic,&in|
|00005380| 66 6f 29 3b 0d 09 0d 09 | 69 66 20 28 69 6e 66 6f |fo);....|if (info|
|00005390| 2e 74 79 70 65 20 3d 3d | 20 61 72 46 6f 6c 64 65 |.type ==| arFolde|
|000053a0| 72 29 0d 09 09 72 65 74 | 75 72 6e 20 2d 31 3b 20 |r)...ret|urn -1; |
|000053b0| 2f 2f 43 61 6e 27 74 20 | 69 6d 70 6f 72 74 20 69 |//Can't |import i|
|000053c0| 6e 74 6f 20 61 20 66 6f | 6c 64 65 72 0d 09 65 6c |nto a fo|lder..el|
|000053d0| 73 65 20 69 66 20 28 69 | 6e 66 6f 2e 74 79 70 65 |se if (i|nfo.type|
|000053e0| 20 3d 3d 20 61 72 56 69 | 65 77 29 0d 09 09 64 65 | == arVi|ew)...de|
|000053f0| 73 74 54 6f 70 69 63 20 | 3d 20 69 6e 66 6f 2e 70 |stTopic |= info.p|
|00005400| 61 72 65 6e 74 3b 20 2f | 2f 57 68 65 6e 20 69 6e |arent; /|/When in|
|00005410| 20 61 20 76 69 65 77 2c | 20 69 6d 70 6f 72 74 20 | a view,| import |
|00005420| 69 6e 74 6f 20 74 68 65 | 20 70 61 72 65 6e 74 20 |into the| parent |
|00005430| 74 6f 70 69 63 2e 0d 09 | 09 0d 09 2f 2f 41 6c 6c |topic...|...//All|
|00005440| 6f 63 61 74 65 20 6f 75 | 72 20 62 75 66 66 65 72 |ocate ou|r buffer|
|00005450| 73 20 61 6e 64 20 74 68 | 65 20 72 65 61 64 20 73 |s and th|e read s|
|00005460| 74 72 65 61 6d 2e 0d 09 | 63 68 61 72 20 2a 72 65 |tream...|char *re|
|00005470| 61 64 42 75 66 66 65 72 | 20 3d 20 28 63 68 61 72 |adBuffer| = (char|
|00005480| 2a 29 63 61 6c 6c 73 2d | 3e 6d 65 6d 2d 3e 41 6c |*)calls-|>mem->Al|
|00005490| 6c 6f 63 4d 65 6d 28 34 | 30 39 36 2c 61 6d 50 74 |locMem(4|096,amPt|
|000054a0| 72 29 3b 0d 09 69 66 20 | 28 72 65 61 64 42 75 66 |r);..if |(readBuf|
|000054b0| 66 65 72 20 3d 3d 20 6e | 69 6c 29 0d 09 09 72 65 |fer == n|il)...re|
|000054c0| 74 75 72 6e 20 2d 31 3b | 0d 09 09 0d 09 53 69 6d |turn -1;|.....Sim|
|000054d0| 70 6c 65 53 74 72 65 61 | 6d 20 73 74 72 65 61 6d |pleStrea|m stream|
|000054e0| 28 66 52 65 66 6e 75 6d | 2c 72 65 61 64 42 75 66 |(fRefnum|,readBuf|
|000054f0| 66 65 72 29 3b 0d 09 63 | 68 61 72 20 2a 62 75 66 |fer);..c|har *buf|
|00005500| 66 65 72 20 3d 20 28 63 | 68 61 72 2a 29 63 61 6c |fer = (c|har*)cal|
|00005510| 6c 73 2d 3e 6d 65 6d 2d | 3e 41 6c 6c 6f 63 4d 65 |ls->mem-|>AllocMe|
|00005520| 6d 28 34 30 39 36 2c 61 | 6d 50 74 72 29 3b 0d 09 |m(4096,a|mPtr);..|
|00005530| 69 66 20 28 62 75 66 66 | 65 72 20 3d 3d 20 6e 69 |if (buff|er == ni|
|00005540| 6c 29 0d 09 09 7b 0d 09 | 09 63 61 6c 6c 73 2d 3e |l)...{..|.calls->|
|00005550| 6d 65 6d 2d 3e 44 65 61 | 6c 6c 6f 63 4d 65 6d 28 |mem->Dea|llocMem(|
|00005560| 72 65 61 64 42 75 66 66 | 65 72 2c 61 6d 50 74 72 |readBuff|er,amPtr|
|00005570| 29 3b 0d 09 09 72 65 74 | 75 72 6e 20 2d 31 3b 0d |);...ret|urn -1;.|
|00005580| 09 09 7d 0d 09 09 0d 09 | 42 6f 6f 6c 65 61 6e 20 |..}.....|Boolean |
|00005590| 77 61 73 54 61 62 3b 0d | 09 63 68 61 72 20 2a 74 |wasTab;.|.char *t|
|000055a0| 65 6d 70 42 75 66 66 65 | 72 20 3d 20 62 75 66 66 |empBuffe|r = buff|
|000055b0| 65 72 3b 0d 09 0d 09 2f | 2f 52 65 61 64 20 70 61 |er;..../|/Read pa|
|000055c0| 73 74 20 74 68 65 20 66 | 69 72 73 74 20 72 6f 77 |st the f|irst row|
|000055d0| 2c 20 74 68 69 73 20 69 | 73 20 6a 75 73 74 20 74 |, this i|s just t|
|000055e0| 68 65 20 6c 61 62 65 6c | 73 0d 09 77 68 69 6c 65 |he label|s..while|
|000055f0| 20 28 73 74 72 65 61 6d | 2e 42 79 74 65 73 52 65 | (stream|.BytesRe|
|00005600| 6d 61 69 6e 69 6e 67 28 | 29 20 3e 20 30 29 0d 09 |maining(|) > 0)..|
|00005610| 09 7b 0d 09 09 74 65 6d | 70 42 75 66 66 65 72 20 |.{...tem|pBuffer |
|00005620| 2b 3d 20 52 65 61 64 54 | 6f 4e 65 78 74 44 65 6c |+= ReadT|oNextDel|
|00005630| 69 6d 69 74 65 72 28 26 | 73 74 72 65 61 6d 2c 74 |imiter(&|stream,t|
|00005640| 65 6d 70 42 75 66 66 65 | 72 2c 34 30 39 36 2c 77 |empBuffe|r,4096,w|
|00005650| 61 73 54 61 62 29 3b 0d | 09 09 74 65 6d 70 42 75 |asTab);.|..tempBu|
|00005660| 66 66 65 72 5b 30 5d 20 | 3d 20 30 3b 0d 09 09 69 |ffer[0] |= 0;...i|
|00005670| 66 20 28 21 77 61 73 54 | 61 62 29 0d 09 09 09 62 |f (!wasT|ab)....b|
|00005680| 72 65 61 6b 3b 0d 09 09 | 7d 0d 09 09 09 0d 09 2f |reak;...|}....../|
|00005690| 2f 49 66 20 77 65 20 61 | 72 65 20 73 6e 69 66 66 |/If we a|re sniff|
|000056a0| 69 6e 67 20 74 68 65 20 | 66 69 6c 65 2c 20 63 68 |ing the |file, ch|
|000056b0| 65 63 6b 20 74 6f 20 73 | 65 65 20 69 66 20 74 68 |eck to s|ee if th|
|000056c0| 65 20 66 69 72 73 74 20 | 6c 69 6e 65 20 69 73 20 |e first |line is |
|000056d0| 77 68 61 74 20 0d 09 2f | 2f 77 65 20 65 78 70 65 |what ../|/we expe|
|000056e0| 63 74 20 69 74 20 74 6f | 20 62 65 2e 0d 09 69 66 |ct it to| be...if|
|000056f0| 20 28 73 6e 69 66 66 29 | 0d 09 09 7b 0d 09 09 2f | (sniff)|...{.../|
|00005700| 2f 54 68 65 20 66 69 72 | 73 74 20 6c 69 6e 65 20 |/The fir|st line |
|00005710| 73 68 6f 75 6c 64 20 6c | 6f 6f 6b 20 6c 69 6b 65 |should l|ook like|
|00005720| 20 74 68 69 73 20 69 66 | 20 74 68 69 73 20 69 73 | this if| this is|
|00005730| 20 74 68 65 20 72 69 67 | 68 74 20 66 6f 72 6d 61 | the rig|ht forma|
|00005740| 74 2e 0d 09 09 63 68 61 | 72 20 2a 66 69 72 73 74 |t....cha|r *first|
|00005750| 4c 69 6e 65 20 3d 20 22 | 54 69 74 6c 65 4c 6f 63 |Line = "|TitleLoc|
|00005760| 61 74 69 6f 6e 44 61 74 | 65 53 74 61 72 74 20 54 |ationDat|eStart T|
|00005770| 69 6d 65 44 75 72 61 74 | 69 6f 6e 50 72 69 76 61 |imeDurat|ionPriva|
|00005780| 74 65 46 6c 65 78 69 62 | 6c 65 4c 61 62 65 6c 41 |teFlexib|leLabelA|
|00005790| 67 65 6e 64 61 2f 4e 6f | 74 65 73 22 3b 0d 09 09 |genda/No|tes";...|
|000057a0| 09 0d 09 09 42 6f 6f 6c | 65 61 6e 20 69 73 47 6f |....Bool|ean isGo|
|000057b0| 6f 64 20 3d 20 73 74 72 | 63 6d 70 28 66 69 72 73 |od = str|cmp(firs|
|000057c0| 74 4c 69 6e 65 2c 62 75 | 66 66 65 72 29 20 3d 3d |tLine,bu|ffer) ==|
|000057d0| 20 30 3b 0d 09 09 63 61 | 6c 6c 73 2d 3e 6d 65 6d | 0;...ca|lls->mem|
|000057e0| 2d 3e 44 65 61 6c 6c 6f | 63 4d 65 6d 28 72 65 61 |->Deallo|cMem(rea|
|000057f0| 64 42 75 66 66 65 72 2c | 61 6d 50 74 72 29 3b 0d |dBuffer,|amPtr);.|
|00005800| 09 09 63 61 6c 6c 73 2d | 3e 6d 65 6d 2d 3e 44 65 |..calls-|>mem->De|
|00005810| 61 6c 6c 6f 63 4d 65 6d | 28 62 75 66 66 65 72 2c |allocMem|(buffer,|
|00005820| 61 6d 50 74 72 29 3b 0d | 09 09 0d 09 09 69 66 20 |amPtr);.|.....if |
|00005830| 28 69 73 47 6f 6f 64 29 | 0d 09 09 09 72 65 74 75 |(isGood)|....retu|
|00005840| 72 6e 20 31 30 30 30 30 | 3b 0d 09 09 65 6c 73 65 |rn 10000|;...else|
|00005850| 0d 09 09 09 72 65 74 75 | 72 6e 20 2d 31 3b 0d 09 |....retu|rn -1;..|
|00005860| 09 7d 0d 0d 09 2f 2f 4d | 61 6b 65 20 73 75 72 65 |.}...//M|ake sure|
|00005870| 20 74 68 65 20 41 72 72 | 61 6e 67 65 20 66 69 65 | the Arr|ange fie|
|00005880| 6c 64 73 20 61 6e 64 20 | 74 79 70 65 73 20 61 72 |lds and |types ar|
|00005890| 65 20 61 6c 6c 6f 63 61 | 74 65 64 20 62 65 66 6f |e alloca|ted befo|
|000058a0| 72 65 20 74 68 65 20 61 | 63 74 75 61 6c 20 69 6d |re the a|ctual im|
|000058b0| 70 6f 72 74 2e 0d 09 61 | 72 54 79 70 65 49 44 20 |port...a|rTypeID |
|000058c0| 74 79 70 65 20 3d 20 41 | 6c 6c 6f 63 61 74 65 46 |type = A|llocateF|
|000058d0| 69 65 6c 64 73 41 6e 64 | 54 79 70 65 73 28 29 3b |ieldsAnd|Types();|
|000058e0| 0d 09 61 72 46 69 65 6c | 64 49 44 20 74 6f 70 69 |..arFiel|dID topi|
|000058f0| 63 4c 69 73 74 46 69 65 | 6c 64 20 3d 20 63 61 6c |cListFie|ld = cal|
|00005900| 6c 73 2d 3e 73 79 73 4f | 62 6a 2d 3e 47 65 74 42 |ls->sysO|bj->GetB|
|00005910| 75 69 6c 74 49 6e 4f 62 | 6a 65 63 74 28 62 6f 54 |uiltInOb|ject(boT|
|00005920| 6f 70 69 63 43 6f 6e 74 | 65 6e 74 73 46 69 65 6c |opicCont|entsFiel|
|00005930| 64 29 3b 0d 09 0d 09 2f | 2f 47 65 6e 65 72 61 74 |d);..../|/Generat|
|00005940| 65 20 6e 6f 74 65 73 20 | 75 6e 74 69 6c 20 77 65 |e notes |until we|
|00005950| 20 72 75 6e 20 6f 75 74 | 20 6f 66 20 66 69 6c 65 | run out| of file|
|00005960| 2e 0d 09 77 68 69 6c 65 | 20 28 73 74 72 65 61 6d |...while| (stream|
|00005970| 2e 42 79 74 65 73 52 65 | 6d 61 69 6e 69 6e 67 28 |.BytesRe|maining(|
|00005980| 29 20 3e 20 30 29 0d 09 | 09 7b 0d 09 09 2f 2f 43 |) > 0)..|.{...//C|
|00005990| 72 65 61 74 65 20 74 68 | 65 20 6e 6f 74 65 0d 09 |reate th|e note..|
|000059a0| 09 61 72 4e 6f 74 65 49 | 44 20 6e 6f 74 65 20 3d |.arNoteI|D note =|
|000059b0| 20 47 65 6e 65 72 61 74 | 65 4d 4d 4e 6f 74 65 28 | Generat|eMMNote(|
|000059c0| 26 73 74 72 65 61 6d 2c | 74 79 70 65 2c 62 75 66 |&stream,|type,buf|
|000059d0| 66 65 72 29 3b 0d 09 09 | 0d 09 09 69 66 20 28 6e |fer);...|...if (n|
|000059e0| 6f 74 65 20 21 3d 20 30 | 29 0d 09 09 09 7b 0d 09 |ote != 0|)....{..|
|000059f0| 09 09 2f 2f 53 65 65 20 | 69 66 20 74 68 65 72 65 |..//See |if there|
|00005a00| 20 69 73 20 61 6c 72 65 | 61 64 79 20 61 20 6d 65 | is alre|ady a me|
|00005a10| 65 74 69 6e 67 20 77 69 | 74 68 20 74 68 65 20 73 |eting wi|th the s|
|00005a20| 61 6d 65 20 74 69 74 6c | 65 2c 20 6c 6f 63 61 74 |ame titl|e, locat|
|00005a30| 69 6f 6e 20 61 6e 64 0d | 09 09 09 2f 2f 74 69 6d |ion and.|...//tim|
|00005a40| 65 2e 20 49 66 20 73 6f | 2c 20 64 65 73 74 72 6f |e. If so|, destro|
|00005a50| 79 20 74 68 65 20 6e 65 | 77 20 6e 6f 74 65 2e 0d |y the ne|w note..|
|00005a60| 09 09 09 69 66 20 28 4d | 4d 4e 6f 74 65 45 78 69 |...if (M|MNoteExi|
|00005a70| 73 74 73 28 6e 6f 74 65 | 29 29 0d 09 09 09 09 63 |sts(note|)).....c|
|00005a80| 61 6c 6c 73 2d 3e 6e 6f | 74 65 73 2d 3e 44 65 73 |alls->no|tes->Des|
|00005a90| 74 72 6f 79 4e 6f 74 65 | 28 6e 6f 74 65 29 3b 0d |troyNote|(note);.|
|00005aa0| 09 09 09 65 6c 73 65 0d | 09 09 09 09 63 61 6c 6c |...else.|....call|
|00005ab0| 73 2d 3e 64 61 74 61 2d | 3e 41 64 64 4c 69 73 74 |s->data-|>AddList|
|00005ac0| 46 69 65 6c 64 45 6e 74 | 72 79 28 64 65 73 74 54 |FieldEnt|ry(destT|
|00005ad0| 6f 70 69 63 2c 74 6f 70 | 69 63 4c 69 73 74 46 69 |opic,top|icListFi|
|00005ae0| 65 6c 64 2c 30 2c 6e 6f | 74 65 2c 6e 75 6c 6c 53 |eld,0,no|te,nullS|
|00005af0| 46 46 29 3b 0d 09 09 09 | 7d 0d 09 09 7d 0d 09 09 |FF);....|}...}...|
|00005b00| 0d 09 2f 2f 44 65 61 6c | 6c 6f 63 61 74 65 20 74 |..//Deal|locate t|
|00005b10| 68 65 20 62 75 66 66 65 | 72 73 2e 0d 09 63 61 6c |he buffe|rs...cal|
|00005b20| 6c 73 2d 3e 6d 65 6d 2d | 3e 44 65 61 6c 6c 6f 63 |ls->mem-|>Dealloc|
|00005b30| 4d 65 6d 28 72 65 61 64 | 42 75 66 66 65 72 2c 61 |Mem(read|Buffer,a|
|00005b40| 6d 50 74 72 29 3b 0d 09 | 63 61 6c 6c 73 2d 3e 6d |mPtr);..|calls->m|
|00005b50| 65 6d 2d 3e 44 65 61 6c | 6c 6f 63 4d 65 6d 28 62 |em->Deal|locMem(b|
|00005b60| 75 66 66 65 72 2c 61 6d | 50 74 72 29 3b 0d 09 72 |uffer,am|Ptr);..r|
|00005b70| 65 74 75 72 6e 20 30 3b | 0d 09 7d 20 2f 2f 20 49 |eturn 0;|..} // I|
|00005b80| 6d 70 6f 72 74 4e 6f 74 | 69 66 79 0d 0d 0d 2f 2a |mportNot|ify.../*|
|00005b90| 20 55 74 69 6c 69 74 79 | 20 75 73 65 64 20 64 75 | Utility| used du|
|00005ba0| 72 69 6e 67 20 69 6d 70 | 6f 72 74 2e 20 52 65 61 |ring imp|ort. Rea|
|00005bb0| 64 69 6e 67 20 66 72 6f | 6d 20 74 68 65 20 63 75 |ding fro|m the cu|
|00005bc0| 72 72 65 6e 74 20 70 6f | 73 69 74 69 6f 6e 20 6f |rrent po|sition o|
|00005bd0| 66 20 74 68 65 20 73 74 | 72 65 61 6d 2c 20 0d 20 |f the st|ream, . |
|00005be0| 2a 20 63 72 65 61 74 65 | 20 61 20 63 75 72 72 65 |* create| a curre|
|00005bf0| 6e 74 20 6e 6f 74 65 20 | 28 61 73 73 75 6d 65 20 |nt note |(assume |
|00005c00| 74 68 61 74 20 74 68 65 | 20 66 69 6c 65 20 69 73 |that the| file is|
|00005c10| 20 63 75 72 72 65 6e 74 | 6c 79 20 61 74 20 74 68 | current|ly at th|
|00005c20| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 0d |e beginn|ing of .|
|00005c30| 20 2a 20 61 20 6c 69 6e | 65 2e 20 52 65 74 75 72 | * a lin|e. Retur|
|00005c40| 6e 20 30 20 69 66 20 74 | 68 65 72 65 20 69 73 20 |n 0 if t|here is |
|00005c50| 61 6e 20 65 72 72 6f 72 | 2c 20 6f 74 68 65 72 77 |an error|, otherw|
|00005c60| 69 73 65 20 72 65 74 75 | 72 6e 20 74 68 65 20 6e |ise retu|rn the n|
|00005c70| 6f 74 65 2e 0d 20 2a 20 | 54 68 69 73 20 61 73 73 |ote.. * |This ass|
|00005c80| 75 6d 65 73 20 74 68 61 | 74 20 41 6c 6c 6f 63 61 |umes tha|t Alloca|
|00005c90| 74 65 46 69 65 6c 64 73 | 41 6e 64 54 79 70 65 73 |teFields|AndTypes|
|00005ca0| 20 68 61 73 20 62 65 65 | 6e 20 63 61 6c 6c 65 64 | has bee|n called|
|00005cb0| 2e 20 0d 20 2a 2f 0d 61 | 72 4e 6f 74 65 49 44 20 |. . */.a|rNoteID |
|00005cc0| 50 6c 75 67 69 6e 3a 3a | 47 65 6e 65 72 61 74 65 |Plugin::|Generate|
|00005cd0| 4d 4d 4e 6f 74 65 28 53 | 69 6d 70 6c 65 53 74 72 |MMNote(S|impleStr|
|00005ce0| 65 61 6d 20 2a 73 74 72 | 65 61 6d 2c 61 72 54 79 |eam *str|eam,arTy|
|00005cf0| 70 65 49 44 20 74 79 70 | 65 2c 20 63 68 61 72 20 |peID typ|e, char |
|00005d00| 2a 62 75 66 66 65 72 29 | 0d 09 7b 0d 09 2f 2f 4d |*buffer)|..{..//M|
|00005d10| 61 6b 65 20 74 68 65 20 | 6e 6f 74 65 2e 0d 09 61 |ake the |note...a|
|00005d20| 72 4e 6f 74 65 49 44 20 | 72 65 73 75 6c 74 4e 6f |rNoteID |resultNo|
|00005d30| 74 65 20 3d 20 63 61 6c | 6c 73 2d 3e 6e 6f 74 65 |te = cal|ls->note|
|00005d40| 73 2d 3e 43 72 65 61 74 | 65 4e 6f 74 65 28 74 79 |s->Creat|eNote(ty|
|00005d50| 70 65 2c 74 72 75 65 29 | 3b 0d 09 42 6f 6f 6c 65 |pe,true)|;..Boole|
|00005d60| 61 6e 20 77 61 73 54 61 | 62 3b 20 0d 09 0d 09 2f |an wasTa|b; ..../|
|00005d70| 2f 4c 6f 6f 70 20 74 68 | 72 6f 75 67 68 20 74 68 |/Loop th|rough th|
|00005d80| 65 20 66 69 65 6c 64 73 | 20 6f 6e 20 74 68 65 20 |e fields| on the |
|00005d90| 6c 69 6e 65 2c 20 69 6d | 70 6f 72 74 69 6e 67 20 |line, im|porting |
|00005da0| 64 61 74 61 2e 20 54 68 | 65 72 65 20 61 72 65 20 |data. Th|ere are |
|00005db0| 73 6f 6d 65 20 0d 09 2f | 2f 73 70 65 63 69 61 6c |some ../|/special|
|00005dc0| 20 63 61 73 65 73 3a 20 | 74 68 65 20 27 53 74 61 | cases: |the 'Sta|
|00005dd0| 72 74 20 44 61 74 65 27 | 20 61 6e 64 20 27 54 69 |rt Date'| and 'Ti|
|00005de0| 6d 65 27 20 66 69 65 6c | 64 20 67 65 74 20 70 61 |me' fiel|d get pa|
|00005df0| 63 6b 65 64 20 74 6f 67 | 65 74 68 65 72 20 69 6e |cked tog|ether in|
|00005e00| 74 6f 0d 09 2f 2f 6f 6e | 65 20 64 61 74 65 2f 74 |to..//on|e date/t|
|00005e10| 69 6d 65 20 66 69 65 6c | 64 2c 20 61 6e 64 20 74 |ime fiel|d, and t|
|00005e20| 68 65 20 64 75 72 61 74 | 69 6f 6e 20 66 69 65 6c |he durat|ion fiel|
|00005e30| 64 20 67 65 74 73 20 63 | 6f 6e 76 65 72 74 65 64 |d gets c|onverted|
|00005e40| 20 69 6e 74 6f 20 61 6e | 20 65 6e 64 20 74 69 6d | into an| end tim|
|00005e50| 65 20 0d 09 2f 2f 62 61 | 73 65 64 20 6f 6e 20 74 |e ..//ba|sed on t|
|00005e60| 68 65 20 73 74 61 72 74 | 20 64 61 74 65 2f 74 69 |he start| date/ti|
|00005e70| 6d 65 2e 0d 09 66 6f 72 | 20 28 49 6e 74 65 67 65 |me...for| (Intege|
|00005e80| 72 20 69 6e 64 65 78 20 | 3d 20 6d 6d 54 69 74 6c |r index |= mmTitl|
|00005e90| 65 3b 20 69 6e 64 65 78 | 20 3c 3d 20 6d 6d 4e 6f |e; index| <= mmNo|
|00005ea0| 74 65 73 3b 20 69 6e 64 | 65 78 2b 2b 29 0d 09 09 |tes; ind|ex++)...|
|00005eb0| 7b 0d 09 09 2f 2f 52 65 | 61 64 20 74 68 65 20 6e |{...//Re|ad the n|
|00005ec0| 65 78 74 20 63 6f 6c 75 | 6d 6e 2e 0d 09 09 49 6e |ext colu|mn....In|
|00005ed0| 74 65 67 65 72 20 66 69 | 65 6c 64 53 69 7a 65 20 |teger fi|eldSize |
|00005ee0| 3d 20 52 65 61 64 54 6f | 4e 65 78 74 44 65 6c 69 |= ReadTo|NextDeli|
|00005ef0| 6d 69 74 65 72 28 73 74 | 72 65 61 6d 2c 62 75 66 |miter(st|ream,buf|
|00005f00| 66 65 72 2c 34 30 39 36 | 2c 77 61 73 54 61 62 29 |fer,4096|,wasTab)|
|00005f10| 3b 0d 09 09 62 75 66 66 | 65 72 5b 66 69 65 6c 64 |;...buff|er[field|
|00005f20| 53 69 7a 65 5d 20 3d 20 | 30 3b 0d 09 09 0d 09 09 |Size] = |0;......|
|00005f30| 2f 2f 46 69 6e 64 20 74 | 68 65 20 66 69 65 6c 64 |//Find t|he field|
|00005f40| 20 74 6f 20 70 75 74 20 | 74 68 65 20 64 61 74 61 | to put |the data|
|00005f50| 20 69 6e 2e 0d 09 09 61 | 72 46 69 65 6c 64 49 44 | in....a|rFieldID|
|00005f60| 20 66 69 65 6c 64 20 3d | 20 47 65 74 41 72 72 61 | field =| GetArra|
|00005f70| 6e 67 65 46 69 65 6c 64 | 46 6f 72 4d 4d 46 69 65 |ngeField|ForMMFie|
|00005f80| 6c 64 28 28 4d 65 65 74 | 69 6e 67 4d 61 6b 65 72 |ld((Meet|ingMaker|
|00005f90| 46 69 65 6c 64 29 69 6e | 64 65 78 29 3b 0d 09 09 |Field)in|dex);...|
|00005fa0| 0d 09 09 2f 2f 49 66 20 | 74 68 65 20 66 69 65 6c |...//If |the fiel|
|00005fb0| 64 20 66 6f 72 20 74 68 | 69 73 20 6e 6f 74 65 20 |d for th|is note |
|00005fc0| 69 73 20 6e 6f 74 20 70 | 72 65 73 65 6e 74 2c 20 |is not p|resent, |
|00005fd0| 74 68 65 6e 20 77 65 20 | 6a 75 73 74 20 73 6b 69 |then we |just ski|
|00005fe0| 70 20 74 68 65 20 63 6f | 6c 2e 20 0d 09 09 2f 2f |p the co|l. ...//|
|00005ff0| 54 68 69 73 20 68 61 70 | 70 65 6e 73 20 77 68 65 |This hap|pens whe|
|00006000| 6e 20 74 68 65 20 6e 61 | 6d 65 20 3c 73 6b 69 70 |n the na|me <skip|
|00006010| 3e 20 69 73 20 70 72 65 | 73 65 6e 74 20 69 6e 20 |> is pre|sent in |
|00006020| 74 68 65 20 66 69 65 6c | 64 20 6e 61 6d 65 20 72 |the fiel|d name r|
|00006030| 65 73 6f 75 72 63 65 20 | 6c 69 73 74 2e 0d 09 09 |esource |list....|
|00006040| 69 66 20 28 66 69 65 6c | 64 20 3d 3d 20 30 29 0d |if (fiel|d == 0).|
|00006050| 09 09 09 63 6f 6e 74 69 | 6e 75 65 3b 0d 09 09 09 |...conti|nue;....|
|00006060| 0d 09 09 2f 2f 4d 61 6b | 65 20 73 75 72 65 20 74 |...//Mak|e sure t|
|00006070| 68 65 20 6e 6f 74 65 20 | 68 61 73 20 74 68 65 20 |he note |has the |
|00006080| 74 61 72 67 65 74 20 66 | 69 65 6c 64 0d 09 09 69 |target f|ield...i|
|00006090| 66 20 28 21 63 61 6c 6c | 73 2d 3e 6e 6f 74 65 73 |f (!call|s->notes|
|000060a0| 2d 3e 4e 6f 74 65 48 61 | 73 46 69 65 6c 64 28 72 |->NoteHa|sField(r|
|000060b0| 65 73 75 6c 74 4e 6f 74 | 65 2c 66 69 65 6c 64 2c |esultNot|e,field,|
|000060c0| 74 72 75 65 29 29 0d 09 | 09 09 63 61 6c 6c 73 2d |true))..|..calls-|
|000060d0| 3e 6e 6f 74 65 73 2d 3e | 41 64 64 46 69 65 6c 64 |>notes->|AddField|
|000060e0| 28 72 65 73 75 6c 74 4e | 6f 74 65 2c 66 69 65 6c |(resultN|ote,fiel|
|000060f0| 64 2c 30 29 3b 0d 0d 09 | 09 2f 2f 41 64 64 20 74 |d,0);...|.//Add t|
|00006100| 68 65 20 64 61 74 61 20 | 74 6f 20 74 68 65 20 66 |he data |to the f|
|00006110| 69 65 6c 64 2e 20 0d 09 | 09 2f 2f 53 70 65 63 69 |ield. ..|.//Speci|
|00006120| 61 6c 20 63 61 73 65 73 | 20 66 6f 72 20 74 68 65 |al cases| for the|
|00006130| 20 64 61 74 65 2c 20 73 | 74 61 72 74 2c 20 61 6e | date, s|tart, an|
|00006140| 64 20 64 75 72 61 74 69 | 6f 6e 20 66 69 65 6c 64 |d durati|on field|
|00006150| 73 2e 0d 09 09 69 66 20 | 28 28 4d 65 65 74 69 6e |s....if |((Meetin|
|00006160| 67 4d 61 6b 65 72 46 69 | 65 6c 64 29 69 6e 64 65 |gMakerFi|eld)inde|
|00006170| 78 20 3d 3d 20 6d 6d 44 | 61 74 65 20 26 26 20 77 |x == mmD|ate && w|
|00006180| 61 73 54 61 62 29 0d 09 | 09 09 7b 0d 09 09 09 2f |asTab)..|..{..../|
|00006190| 2f 54 68 65 20 27 44 61 | 74 65 27 20 66 69 65 6c |/The 'Da|te' fiel|
|000061a0| 64 20 69 73 20 61 63 74 | 75 61 6c 6c 79 20 73 74 |d is act|ually st|
|000061b0| 6f 72 65 64 20 69 6e 20 | 74 77 6f 20 63 6f 6c 75 |ored in |two colu|
|000061c0| 6d 6e 73 20 69 6e 20 74 | 68 65 20 6c 69 73 74 2c |mns in t|he list,|
|000061d0| 20 74 68 65 20 0d 09 09 | 09 2f 2f 27 64 61 74 65 | the ...|.//'date|
|000061e0| 27 20 63 6f 6c 20 61 6e | 64 20 74 68 65 20 27 73 |' col an|d the 's|
|000061f0| 74 61 72 74 27 20 63 6f | 6c 2e 20 57 65 20 63 6f |tart' co|l. We co|
|00006200| 6e 63 61 74 65 6e 61 74 | 65 2c 20 77 69 74 68 20 |ncatenat|e, with |
|00006210| 61 6e 20 27 40 27 20 69 | 6e 20 74 68 65 20 6d 69 |an '@' i|n the mi|
|00006220| 64 64 6c 65 2c 0d 09 09 | 09 2f 2f 73 6f 20 41 72 |ddle,...|.//so Ar|
|00006230| 72 61 6e 67 65 20 63 61 | 6e 20 70 61 72 73 65 20 |range ca|n parse |
|00006240| 74 68 65 20 64 61 74 65 | 2c 20 61 6e 64 20 74 68 |the date|, and th|
|00006250| 65 6e 20 73 74 6f 72 65 | 2c 20 61 64 76 61 6e 63 |en store|, advanc|
|00006260| 69 6e 67 20 70 61 73 74 | 20 74 68 65 20 0d 09 09 |ing past| the ...|
|00006270| 09 2f 2f 6e 65 78 74 20 | 63 6f 6c 2e 0d 09 09 09 |.//next |col.....|
|00006280| 62 75 66 66 65 72 5b 66 | 69 65 6c 64 53 69 7a 65 |buffer[f|ieldSize|
|00006290| 2b 2b 5d 20 3d 20 27 40 | 27 3b 0d 09 09 09 49 6e |++] = '@|';....In|
|000062a0| 74 65 67 65 72 20 74 69 | 6d 65 53 69 7a 65 20 3d |teger ti|meSize =|
|000062b0| 20 52 65 61 64 54 6f 4e | 65 78 74 44 65 6c 69 6d | ReadToN|extDelim|
|000062c0| 69 74 65 72 28 73 74 72 | 65 61 6d 2c 26 62 75 66 |iter(str|eam,&buf|
|000062d0| 66 65 72 5b 66 69 65 6c | 64 53 69 7a 65 5d 2c 34 |fer[fiel|dSize],4|
|000062e0| 30 39 36 2c 77 61 73 54 | 61 62 29 3b 0d 09 09 09 |096,wasT|ab);....|
|000062f0| 62 75 66 66 65 72 5b 66 | 69 65 6c 64 53 69 7a 65 |buffer[f|ieldSize|
|00006300| 20 2b 20 74 69 6d 65 53 | 69 7a 65 5d 20 3d 20 30 | + timeS|ize] = 0|
|00006310| 3b 0d 09 09 09 0d 09 09 | 09 2f 2f 4d 61 6b 65 20 |;.......|.//Make |
|00006320| 73 75 72 65 20 74 6f 20 | 61 64 76 61 6e 63 65 20 |sure to |advance |
|00006330| 74 68 65 20 69 6e 64 65 | 78 20 74 6f 20 74 68 65 |the inde|x to the|
|00006340| 20 6e 65 78 74 20 63 6f | 6c 75 6d 6e 2c 20 73 69 | next co|lumn, si|
|00006350| 6e 63 65 20 77 65 20 68 | 61 76 65 20 72 65 61 64 |nce we h|ave read|
|00006360| 20 74 77 6f 20 0d 09 09 | 09 2f 2f 63 6f 6c 75 6d | two ...|.//colum|
|00006370| 6e 73 20 61 74 20 6f 6e | 63 65 2e 0d 09 09 09 69 |ns at on|ce.....i|
|00006380| 6e 64 65 78 2b 2b 3b 0d | 09 09 09 0d 09 09 09 2f |ndex++;.|......./|
|00006390| 2f 53 74 6f 72 65 20 74 | 68 65 20 64 61 74 65 20 |/Store t|he date |
|000063a0| 61 73 20 74 65 78 74 2c | 20 61 6e 64 20 74 65 6c |as text,| and tel|
|000063b0| 6c 20 41 72 72 61 6e 67 | 65 20 74 6f 20 70 61 72 |l Arrang|e to par|
|000063c0| 73 65 20 69 74 2e 0d 09 | 09 09 63 61 6c 6c 73 2d |se it...|..calls-|
|000063d0| 3e 64 61 74 61 2d 3e 53 | 65 74 46 69 65 6c 64 54 |>data->S|etFieldT|
|000063e0| 65 78 74 28 72 65 73 75 | 6c 74 4e 6f 74 65 2c 66 |ext(resu|ltNote,f|
|000063f0| 69 65 6c 64 2c 62 75 66 | 66 65 72 2c 0d 09 09 09 |ield,buf|fer,....|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.